SAX Parser for Oracle 8.1.5 needed!!! Urgent

Please help.
If you know something please send me mail.
Regards
Kail

Would you tell us how your will use SAX parser?

Similar Messages

  • SAX Parser for Oracle 8.1.5

    I need SAX parser - i want load this class into DB. Any ideas?
    Adam

    Have i possibilities to using some javatypes in oracle java stored procedure if this class is not loaded into db?
    Cause i would like to create a java stored procedure to parse and insert some data from xml. I was thinking to pass xml file name as a parameter to my java procedure.
    I must use Oracle 8.1.5 with jdk 1.1.7, and the best parser for me is SAX.
    Please help.
    Have i possobilities to use class inside oracle, which are placed outside oracle?
    Something like classpath, where can i modify value (but classpath inside oracle)?

  • Java +XML (SAX) Parser for Oracle 8.1.5 EE

    Hi there :)
    I am looking java classes for SAX to parse XML. I cannot find a valid parser, cause after downloaded from Oracle XDK for java, when i try to load this calasses i get a messages that i alot of classes connot be resolved.
    If somebody have valid classes on Ora 8.1.5 please send me mail.
    Adam

    Have i possibilities to using some javatypes in oracle java stored procedure if this class is not loaded into db?
    Cause i would like to create a java stored procedure to parse and insert some data from xml. I was thinking to pass xml file name as a parameter to my java procedure.
    I must use Oracle 8.1.5 with jdk 1.1.7, and the best parser for me is SAX.
    Please help.
    Have i possobilities to use class inside oracle, which are placed outside oracle?
    Something like classpath, where can i modify value (but classpath inside oracle)?

  • Sax Parser for loading XML file

    We have a requirment by which we need to load huge XMl file in our DB everyday.
    THe XML file format is like --
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <emp>
    <ename>aaa</ename>
    <sal>3000</sal>
    </emp>
    <emp>
    <ename>bbb</ename>
    <sal>5000</sal>
    </emp>
    <dept>
    <name>productiong</name>
    <location>USA</location>
    <dept>
    I have written XMl SAX parser to load this file into DB -
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.XMLReader;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.Attributes;
    import java.io.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.OracleDataSource;
    import java.util.*;
    public class test extends DefaultHandler
    String thisElement="";
    String table_name="";
    String table_name_2="";
    String sql="";
    String value_clause="";
    StringBuffer value_clauseBuffer;
    String Insert_sql="";
    int flag;
    String columnNames="";
    String questionmarks="";
    static String conStr = "jdbc:oracle:thin:@abcd1234:1521:dss501";
    static Connection conn;
    String arrayValues[] = new String[30];
    int j = 0;
    int emptyElementFlag = 0;
    public SurveyReader() throws SQLException, FileNotFoundException, IOException{
    DBConnect("username", "password");
    public static void DBConnect(String username, String password)
    throws SQLException, FileNotFoundException, IOException {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(conStr, username, password);
    conn.setAutoCommit(true);
    public void startElement(String namespaceURI, String localName,
    String qName, Attributes atts) throws SAXException {
    thisElement = qName;
    if (thisElement!=table_name){
    columnNames = columnNames + ", " + qName;
    questionmarks = questionmarks +", " + "?";
    emptyElementFlag =0;
    public void characters(char[] ch, int start, int length)
    throws SAXException {
    if (thisElement !="root"){     
    if ((length == 0) && (thisElement !="") ){
    table_name = thisElement;
    sql = " Insert into "+ table_name +"(";
    value_clause="";
    value_clauseBuffer =null;
    columnNames = "";
    questionmarks ="";
    j =0;
    if ((length != 0) && (thisElement!="") && (thisElement!=table_name)){
    emptyElementFlag = 1;
    String s = new String(ch, start, length);
    String newString = s.replaceAll("'", "''");
    // String newString = s;
    if (value_clauseBuffer== null){
    value_clauseBuffer = new StringBuffer(newString);
    else{
    value_clauseBuffer.append(newString);
    public void endElement(String namespaceURI, String localName, String qName)
    throws SAXException {
    if (thisElement !="root"){
    if ((!(value_clauseBuffer == null))||((emptyElementFlag ==0) && (qName !=table_name))) {
    try{
    //value_clauseBuffer.append("', '");
    if (value_clauseBuffer == null){
    arrayValues[j]="";
    else{
    arrayValues[j]=""+value_clauseBuffer;
    j = j+1;
    value_clauseBuffer = null;
    emptyElementFlag =0;
    }catch(Exception e){
    System.err.println(e);
    System.exit(2);
    if (qName == table_name){
    if (!(value_clauseBuffer == null)){
    value_clause = "'"+value_clauseBuffer;
    columnNames =columnNames.substring(1, columnNames.length());
    int paramNumber = j;
    questionmarks =questionmarks.substring(1, questionmarks.length());
    sql = sql + columnNames + " ) values (" + questionmarks +"); ";
    Insert_sql=Insert_sql + sql;
    sql = "Begin "+sql + " End; ";
         try{
         PreparedStatement pstat = conn.prepareStatement(sql);
    for (int i=0; i<=j-1; i++ ){
    int k = i+1;
    pstat.setObject(k, arrayValues);
         ResultSet rset = pstat.executeQuery();
         rset.close();
         pstat.close();
    catch (Exception e) {
    System.err.println(e);
    System.out.print("sql " + sql);
    System.exit(1);
    table_name_2 = table_name;
    thisElement = "";
    public static void main (String args[]) {
    XMLReader xmlReader = null;
    System.out.println("Time " + new java.util.Date());
    try {
    SAXParserFactory spfactory = SAXParserFactory.newInstance();
    spfactory.setValidating(false);
    SAXParser saxParser = spfactory.newSAXParser();
    xmlReader = saxParser.getXMLReader();
    xmlReader.setContentHandler(new SurveyReader());
    xmlReader.setErrorHandler(new SurveyReader());
    InputSource source = new InputSource("short.xml");
    xmlReader.parse(source);
    conn.close();
    } catch (Exception e) {
    System.err.println(e);
    System.exit(1);
    This parser takes 2 hours to laod file of size around 8MB.
    ANy suggestions on improving performance of the parser.
    ANy other approach I should be taking to load this file into DB.
    We are using ORacle 9i DB with Character set UTF 8.
    Thanks!

    String buf = (new String(ch, start, length)).trim();
    if (thisElement != "root"){   
    if ((buf.length() == 0) && (thisElement !="") ){
    It run ok!
    Thanks 58871!
    Now, i want to export oracle table to xml file like :
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <emp>
    <ename>aaa</ename>
    <sal>3000</sal>
    </emp>
    <emp>
    <ename>bbb</ename>
    <sal>5000</sal>
    </emp>
    </root>
    Can SAX export to xml format?
    Pham Thanh Tung

  • SAX parser for PL/SQL

    For a long time on technet the
    PL/SQL parser release notes have
    said that they will be supporting
    SAX in a future release. Is there
    any idea of when this support may
    materialize? Or is Java the only
    option for a parser in the db for
    the near future that can handle large
    documents?
    null

    What would you want to use as the implementation of the SAX2 ContentHandler interface in PL/SQL? Stored procedure-based callbacks? Just curious how you would envision this working. Your input is valuable to our future thinking in this area. Most teams using PL/SQL that want to use SAX have written Java Stored Procedures that use SAX internally inside the stored procedure (written in Java) but are not doing the SAX parsing with PL/SQL-based callbacks.

  • AGAIN - Needed SAX parser for java on Oracle 8.1.5

    like in subject.
    I load succesful sax2, but i need load more useful parser like from oracle or ibm.
    But when i try i get a lot of errors like ORA-29534 (NullPointerOperation).
    Kail

    Only XML Parser v2 release 2.0.2.7 from Oracle works in 8.1.5, and this release does not support SAX2 unfortunately.

  • XML parser for Oracle 8i

    I would like to use XMLparser for plsql in Oracle 8i. I know that I can download the parser from the OTN. Can anyone tell me how to install it to Oracle8i? or does Oracle 8i DBMS already has one installed/embedded into it as the default DBMS.
    Furthermore, the directions in OTN tells us to install JKD1.1.x or above and GNUgzip?
    Why do I have to install JDK to use the parser? and what is GNU gzip?
    Thank you very much
    Ben

    There is a readme file in that package which
    show you how to install it into your Oracle8i
    database.
    Duy

  • SAX Parser For XML

    Hello all,
    I am trying Parsing XML thorugh SAX. Were to get SJXP.jar and parser.jar files on sun site
    if any body have these files plz mail :[email protected]

    String buf = (new String(ch, start, length)).trim();
    if (thisElement != "root"){   
    if ((buf.length() == 0) && (thisElement !="") ){
    It run ok!
    Thanks 58871!
    Now, i want to export oracle table to xml file like :
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <emp>
    <ename>aaa</ename>
    <sal>3000</sal>
    </emp>
    <emp>
    <ename>bbb</ename>
    <sal>5000</sal>
    </emp>
    </root>
    Can SAX export to xml format?
    Pham Thanh Tung

  • Java with oracle ...Help needed urgently.?

    I want to store my java object into oracle .my question is how to get mapping of java with oracle object done.Please if anyone reads and knows abt it plz help me.

    Give more details.
    are you talking about java stored procedures? or using oracle as ordbms?
    version of oracle??
    In any case you can get documentation from http://otn.oracle.com
    Saifuddin

  • How to conevrt a Document into InoutSource for SAX parsing

    I was trying to perform SAX parsing for a Document.
    Can anybody help me out?
    regards,
    Ranjan

    I need it because I have two big Documents with cross references depending upon business requirement. If I am doing DOM manilation then its very expensive in terms of performance. So I want to perform a SAX parsing.
    One way to achieve this it to perform Transformation with
    SAXResult result = new SAXResult(conHandler);//this is my DefaultHandler
    transformer.transform(dsource,result); //dsource is the DOM source of my first Document
    Is the any otherway around?
    regards,
    Ranjan

  • I need some simple examples to start with for Oracle ESB

    Hi All,
    Please share some simple examples to startwith for Oracle ESB.
    I need to understand, what are the files are created, once created an ESB project.
    What is the use of the files how to edit them with out using JDeveloper.
    Iam trying to create a simple example.
    I would like to create a file which has only "HELLO" in that file, simple text file inside a folder "INPUT" in my c:\ drive.
    I wanted to create a ESB service which picks up the file and add a string to it like "HELLO" + "ESB" and drop this file into "OUTPUT" folder in c:\ drive.
    How do i do that. I tried to do it when i deploy the integration server connection is gettting hit badly. I dont see that connection any more and i dont see that connection in my JDeveloper.
    I dont want to start with existing code.
    Please help
    Regards,
    Vijay.B
    Message was edited by:
    Vijay.B
    Message was edited by:
    Vijay.B

    Hi,
    If you want to do it from scratch you can basically do the following:
    Make sure you have created an application server and integration server connection in JDeveloper.
    1) Create a new JDeveloper project of type ESB project.
    2) Possibly add a ESB System/Group (open the esb file and click "Create System/Group") to group ESB projects.
    3) Create an XML schema describing your input XML file. Probably one element of type xsd:string.
    4) Create an example XML file which is well-formed and valid according to the XSD from step 3.
    5) Create a new File adapter (inbound/read). A routing service is automatically created.
    6) Create a new File adapter (outbound/write).
    7) Create a routing rule in the routing service in which you invoke the write method of the outbound file adapter. Possibly add a transformation using the XSL mapper.
    8) Deploy the ESB project to the server.
    9) Drop your XML file (from step 4) in the directory in which the inbound file adapter is polling.
    10) If it is ok, the file should be picked up, transformed and dropped in the outbound directory. A new ESB instance should be visible in the ESB console.
    See what files are generated on the filesystem in each of the above steps.
    Regards, Ronald

  • Xml sax parser

    Hi all,
    I am newbie to xml. I am using SAX parser for parsing xml documents. I have to write a code which parses all types of xsd files(including which can contain inline , referenced or both). Can anyone help / guide me how to code a generic xsd parser??
    Thanks in advance,

    An XSD file is an XML file, so you can parse it using sax.
    See :
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/work/Echo02.java
    See also:
    http://www.oracle.com/technology/tech/xml/xdk/doc/production/java/doc/java/javadoc/oracle/xml/parser/schema/XMLSchema.html#getXMLSchemaNodeTable

  • SAX Parsing in Adapter Module

    Hi All,
    I need to build a custom Adapter Module where i want to use SAX Parsing for parsing XML document. I tried with a piece of Code but i'm getting following error while running the same:
    Error occurred while sending message (GUID 6da4ff1c-3736-4990-1881-a8f09edd5fde): null
    When i check the Audit Log the i just see following two lines:
    Success Channel JDBC_s_Article_Grp1: Query executed successfully and confirmation skipped. Data may be sent again ("TEST" mode)
    Send query result. Size: 1398556 characters
    There are no logs being created for module at all. Also when i run the same code with DOM parsing, it works perfectly fine.
    I have tries with re-deployment multiple times but no result.
    Any pointers?
    Regards,
    Anurag

    try to handle exceptions and use logging to know what the issue is.
    That is the best way to troubleshoot your code
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a?quicklink=index&overridelayout=true
    refer section 4.4.2 Writing Audit Logs

  • SAX parser splits up character data; I expected Ign. whitesp

    Im am working on a XML parser for loading data from some back
    end systems into an Oracle 8i database. I am using the SAX
    parser for this purpose. After doing some tests with larger
    amounts of XML data (> 1M), I found some unexpected behaviour.
    The parser sometimes splits up character data into two chunks of
    data. The XML looks as follows:
    <TAGNAME> this is the character data </TAGNAME>
    The parser raises the following events:
    1 startElement name = "TAGNAME"
    2 characters chbuf = " "
    3 characters chbuf = "this is the character data "
    4 endElement name = "TAGNAME"
    I expected an ignorableWhitespace event at step 2. The XML
    document contains repetitive tagnames. The strange thing about
    the parse process is that the parser splits up the character
    data only sometimes, and I can't determine any kind of logica
    for this behaviour. Most occurrences of exactly the same tagname
    and character data are parsed correctly (that is, as I
    expected).
    Am I dealing with correct behaviour here, or is it a bug??
    Rolf.
    null

    Oracle XML Team wrote:
    : Rolf van Deursen (guest) wrote:
    : : Im am working on a XML parser for loading data from some
    back
    : : end systems into an Oracle 8i database. I am using the SAX
    : : parser for this purpose. After doing some tests with larger
    : : amounts of XML data (> 1M), I found some unexpected
    behaviour.
    : : The parser sometimes splits up character data into two
    chunks
    : of
    : : data. The XML looks as follows:
    : : <TAGNAME> this is the character data </TAGNAME>
    : : The parser raises the following events:
    : : 1 startElement name = "TAGNAME"
    : : 2 characters chbuf = " "
    : : 3 characters chbuf = "this is the character data "
    : : 4 endElement name = "TAGNAME"
    : : I expected an ignorableWhitespace event at step 2. The XML
    : : document contains repetitive tagnames. The strange thing
    about
    : : the parse process is that the parser splits up the character
    : : data only sometimes, and I can't determine any kind of
    logica
    : : for this behaviour. Most occurrences of exactly the same
    : tagname
    : : and character data are parsed correctly (that is, as I
    : : expected).
    : : Am I dealing with correct behaviour here, or is it a bug??
    : : Rolf.
    : The behavior is expected and correct. Could you elaborate on
    why
    : you would expect the parser to treat the whitespace signalled
    in
    : step 2 as ignorable?
    : Oracle XML Team
    : http://technet.oracle.com
    : Oracle Technology Network
    Thank you for your quick response.
    In my test XML, there are about 27500 tags containing character
    data. All character data starts with a whitespace character.
    After parsing the xml, the whitespace of only 5 (!) tags is
    treated as a seperate character event (so two character events
    are raised in succession). The remaining tags all raise only ONE
    character event for the entire character data. I can't explain
    the difference in treatment.
    null

  • Using the SAX parser to split up a document to be processed by a DOMParser

    I need to process a potentially large document which could prove too large to be read into memory at once by the DOM parser. The document would look something like..
    (sorry about the formatting - can't use tabs!)
    <Root>
    <Parent>
    <Child>
    <Blah.....................
    </Blah>
    </Child>
    </Parent>
    <Parent>
    <Child.......
    </Child>
    </Parent>
    etc...
    etc...
    </Root>
    The number of Parent elements could potentially be in the thousands. What I would like to do would be to use the SAX parser to read the document and when a Parent element is encountered, write the parent element and all its children to a stream in order that an input source can be created. The input source can then be parsed by a DOM parser. Once complete, the next Parent element encountered by the SAX parser could be passed to the DOM parser and so on until all of the Parent elements have been processed.
    This way I can combine the ease of parsing the document using the DOM parser without having to worry about the overhead on memory.
    Does anyone have any ideas as to the best approach? I could use the SAX parser for the whole thing but the XML is quite complex and lends itself to DOM parsing much more conveniently.

    Can you read the file line by line:
    start the reading at <child>
    pause reading at </child>
    copy the string to a var
    wrap it with respective tags (<?xml<doctype etc...) and parse
    proceed to the next <child>xx</child>
    and repeat till you hit the closing of the file...
    - Ravi

Maybe you are looking for

  • JPG images not displayed correctly in Bridge and Photoshop

    I am using CS4 under OSX 10.4.11 on a PowerMac G5 Quad. Images which have been captured as JPG are displayed fine by Preview, but when opened in Bridge, Camera Raw or Photoshop. the colours are all "washed out". The attached screen capture should giv

  • Using Clipmate to copy and paste between projects

    Thanks to Robert Johnston for the inspiration (and perspiration) for this method for copying and pasting between PE projects. One residual side effect of the method is that the audio and video of the copied clips will be unlinked. The renaming folder

  • OBIEE 11g - Navigation from Hierarchy Column

    Hi Experts, I have created one Organization Hierarchy (Country --> Region --> State --> City) in the Logical Layer of the rpd and pull that hierarchy with the dimension in the Presentation Layer. In the new analysis I have created dashboard prompt wi

  • SP Version in Configuring NWDI

    Hello Experts,       I am in the process of configuring NWDI, my doubt is i have deployed NWDI SP14 files but my JAVA   WAS is of SP15? Will both be compatible? I looked at this forum How to Install NWDI on SAP NW 2004s SP7 but those are for earlier

  • Does anyone know how to load ACR presets when using ACR in the creative cloud?

    Does anyone know how to load ACR presets when using ACR in the creative cloud?