PL/SQL XML Parser (problem getting text of a node)

I am trying to get the contents of an ELEMENT (node with a CDATA section) using xmldom.getNodeValue(). However, it seems that there is a MAXIMUM number of characters that I can get back.
I think I've found a work-around using xmldom.writeToBuffer() which seems to write all of the CDATA contents to a VARCHAR2 variable. Now my problem is that it is using strings like '&#60' and '&#38'. I recognize these strings as being "internal representations of '<' and '&' respectively. I'd not have to replace every occurence of these types of strings with the ASCII equivalent -especially since I don't know all of the possible '&#nn' strings that may crop up.
Help!

The use of "//" or "\\" appears to be a bug in JServer. It has
been filed. You should not specify the path as a shared
directory as a workaround.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Andre (guest) wrote:
: Oracle 8.1.5 database on NT
: When i try running the example with command:
: SQL*Plus> exec domsample
: ('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
: I get the following error:
: ERROR at line 1:
: ORA-20100: Error occurred while parsing:
: //ORACLE/xml_tmp/err.txt
: ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
: ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
: ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
: ORA-06512: at line 1
: If i use backward-slashes '\' which should be OK for NT i get:
: ORA-20100: Error occurred while parsing:
: \\ORACLE\xml_tmp/err.txt
: I tried using a directory (create directory ...) but this
: results in the same error.
: Thus anyone now how it should be done?
: Thanks
null

Similar Messages

  • PL/SQL XML Parser - problem running example

    Oracle 8.1.5 database on NT
    When i try running the example with command:
    SQL*Plus> exec domsample
    ('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
    I get the following error:
    ERROR at line 1:
    ORA-20100: Error occurred while parsing:
    //ORACLE/xml_tmp/err.txt
    ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
    ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
    ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
    ORA-06512: at line 1
    If i use backward-slashes '\' which should be OK for NT i get:
    ORA-20100: Error occurred while parsing:
    \\ORACLE\xml_tmp/err.txt
    I tried using a directory (create directory ...) but this
    results in the same error.
    Thus anyone now how it should be done?
    Thanks
    null

    The use of "//" or "\\" appears to be a bug in JServer. It has
    been filed. You should not specify the path as a shared
    directory as a workaround.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Andre (guest) wrote:
    : Oracle 8.1.5 database on NT
    : When i try running the example with command:
    : SQL*Plus> exec domsample
    : ('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
    : I get the following error:
    : ERROR at line 1:
    : ORA-20100: Error occurred while parsing:
    : //ORACLE/xml_tmp/err.txt
    : ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
    : ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
    : ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
    : ORA-06512: at line 1
    : If i use backward-slashes '\' which should be OK for NT i get:
    : ORA-20100: Error occurred while parsing:
    : \\ORACLE\xml_tmp/err.txt
    : I tried using a directory (create directory ...) but this
    : results in the same error.
    : Thus anyone now how it should be done?
    : Thanks
    null

  • ?xml version = '1.0' encoding = 'ASCII'? pl/sql xml parser

    When ever I parse a document which has the
    <?xml version = '1.0' encoding = 'ASCII'?> tag as the first line hangs the pl/sql xml parser . If I remove the "encoding = 'ASCII'" from the file everything works fine ! What is the problem ?
    version 8.1.6 / plsql parser v2 / hpux 11x
    Here is the input file
    <?xml version = '1.0' encoding = 'ASCII'?>
    !--- This is a comment -->
    <person>
    <employee>
    <lastname>GHANTASALA</lastname>
    <firstname>SREE</firstname>
    <age>32</age>
    </employee>
    <employee>
    <lastname>TAMATAM</lastname>
    <firstname>SATISH</firstname>
    <age>30</age>
    </employee>
    </person>
    Here is my program
    declare
    p xmlparser.parser;
    doc xmldom.DOMDocument;
    dir varchar2(100) := '/apps/oracle/drugstore';
    errfile varchar2(30) := 'err.txt' ;
    inpfile varchar2(30) := 'person.xml';
    nl xmldom.DOMNodeList;
    len number;
    n xmldom.DOMNode;
    new_node xmldom.DOMNode;
    node_name varchar2(100);
    node_value varchar2(100);
    begin
    -- new parser
    p := xmlparser.newParser;
    -- Set some characteristics
    xmlparser.setValidationMode(p, FALSE);
    xmlparser.setErrorLog(p, dir&#0124; &#0124;'/'&#0124; &#0124; errfile );
    xmlparser.setBaseDir(p, dir);
    -- parse input file
    xmlparser.parse(p, dir&#0124; &#0124;'/'&#0124; &#0124;inpfile);
    -- get document
    doc := xmlparser.getDocument(p);
    -- get all elements
    nl := xmldom.getElementsByTagName(doc, '*');
    len := xmldom.getLength(nl);
    dbms_output.put_line('Length='&#0124; &#0124;len);
    -- loop through elements
    for i in 0..len-1 loop
    n := xmldom.item(nl, i);
    node_name := xmldom.getNodeName(n);
    -- get the text node associated with the element node
    n := xmldom.getFirstChild(n);
    if xmldom.getNodeType(n) = xmldom.TEXT_NODE then
    node_value := xmldom.getNodeValue(n);
    if node_name='lastname' then
    dbms_output.put_line('The value you are looking for is -->:'&#0124; &#0124;node_value);
    if node_value = 'GHANTASALA' then
    xmldom.setNodeValue(n,'TEST2');
    end if;
    end if;
    end if;
    end loop;
    new_node := xmldom.makeNode(doc);
    xmldom.writeToFile(new_node, dir &#0124; &#0124;'/'&#0124; &#0124;'mod.xml');
    end ;
    null

    The encoding header is actually generated by
    by the following piece of code in my pl/sql program .
    new_node := xmldom.makeNode(doc);
    xmldom.writeToFile(new_node, dir &#0124; &#0124;'/'&#0124; &#0124;'mod.xml');
    Since this is a document created by the pl/sql parser, I assume there is some meaning to it !
    Also why is it hanging ? PL/sql parser should tell me that it is not a valid string !

  • Error while running PL/SQL XML Parser Samples

    every time try to run the PL/SQL XML Parser Sample program i get this error no file or directory, though the file and dir exists, i have the permissions setup as in readme.txt do i need to do any chnages to init.ora,
    pls advice
    Thanks,
    SQL> exec test
    begin test; end;
    ERROR at line 1:
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "SCOTT.XMLPARSER", line 22
    ORA-06512: at "SCOTT.XMLPARSER", line 69
    ORA-06512: at "SCOTT.TEST", line 13
    ORA-06512: at line 1

    Which examples in particular? Thanks.

  • PL/SQL XML Parser demo

    i've downloaded the Pl/SQL XML parser demo - xslsample / domsample - followed the guide , etc but I'm getting ....
    BEGIN xslsample ('/export/home/oracle/plmx/sample','family.xml','iden.xsl','family.out','errors.txt'); END;
    ERROR at line 1:
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:187
    Uncaught exception Root of all Java exceptions:
    ORA-06512: at "PLMX.XMLPARSERCOVER", line 0
    ORA-06512: at "PLMX.XMLPARSER", line 57
    ORA-06512: at "PLMX.XSLSAMPLE", line 28
    ORA-06512: at line 1
    anybody seen this ??

    There is no such limit on our Parser for PL/SQL. Could you
    perhaps be using the PLXML Utilities? If you are you might try
    our PL/SQL Parser instead.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Premal Mehta (guest) wrote:
    : Hi
    : I am using PL/SQL XML Parser to add XML data in database. I
    : am having trouble when using file sixe greater than 500KB?
    : What is the alternative? Can I do something to process
    larger
    : files?
    : Please Help, this is quite urgent.
    : Hoping for help,
    : Premal.
    null

  • Poweshell script to parse a XML document to get all Leaf level nodes with Node names in CSV

    Hi Experts,
    I want to write a Powershell script to parse a XML document to get all Leaf level nodes with Node names in CSV
    <?xml version="1.0" encoding="UTF-8"?>
    <CATALOG>
       <CD>
          <TITLE>Empire Burlesque</TITLE>
          <ARTIST>Bob Dylan</ARTIST>
          <COUNTRY>USA</COUNTRY>
          <COMPANY>Columbia</COMPANY>
          <PRICE>10.90</PRICE>
          <YEAR>1985</YEAR>
       </CD>
    </CATALOG>
    Need to display this as
    CD_Tiltle, CD_ARTIST, CD_COUNTRY, CD_COMPANY, CD_PRICE, CD_YEAR
    Empire Burlesque, Bob Dylan,USA,Columbia,10.90,1985
    and so on..
    I do not want to hard code the tag names in the script.
    current example is 2 level hierarchy XML can be many level till 10 max I assume
    in that case the csv file field name will be like P1_P2_P3_NodeName as so on..
    Thanks in advance
    Prajesh

    Thankfully, I have writtenscript for ths same $node_name="";
    $node_value="";
    $reader = [system.Xml.XmlReader]::Create($xmlfile)
    while ($reader.Read())
    while ($reader.Read())
    if ($reader.IsStartElement())
    $node_name += "," + $reader.Name.ToString();
    if ($reader.Read())
    $node_value += "," + $reader.Value.Trim();
    Thanks and Regards, Prajesh Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

  • WIJ 20002 xml Parser Problem - Rich Client

    Hi,
    I have a problem with the rich client on a new installation:
    Business Objects Enterprise XI 3.1 SP3 on Windows 2008 Standard.
    If I connect with the rich client "import document"is disabled.
    if I try to create a new document from the rich client it returns the error below (I used the rich client on two workstations):
    WIJ 20002
    Version: null
    Analisi dello stack:
    java.lang.RuntimeException: java.lang.RuntimeException: XML parser problem:
    XMLJaxpParser.parse(): Element type "ABOUT_Patentnumbers" must be followed by either attribute specification, ">" or "/>".
    at com.businessobjects.wp.xml.jaxp.XMLJaxpParser.parse (Unknown Source)
    at.com.businessobjects.webi.richclient.XMLviaOccaRC.getServerConfiguration (Unknown Source)
    Have you any solution?

    The fixpack 3.5 client resolves the problem.

  • XML parsing problems with Oracle XML parser for PL/SQL

    I am using the Oracle XML parser for PL/SQL to transform XML into HTML usign XSL. The parser gives me sporadic errors trying to parse various XML documents. For the same XML source, the XMLPARSER will parse without errors one day and the next day will give me errors such as "invalid char in text", "Expected ';'.", or even Java null pointer exceptions.
    I have verified that the XML sources are well formed, so I am pretty certain that the problems I am having are bugs in the XMLPARSER.
    Is there going to be a XML parser for PL/SQL version 2 that will fix these bugs? If so, when??? If not, is there anything else I could do to fix these problems?
    Thanks!

    You can use the latest version.

  • XML Parsing - problem with a value of an element if starting with space

    Hi Experts,
    I need your valuable guidence to get out of a problem in parsing an XML file.
    An XML file is read into xstring variable and it is processed to be split into the corresponding itab.
    Please find the code below
    types: begin of ty-itab,
                field(4096),
              end of ty-itab.
    Data:
    g_ixml                       TYPE REF TO if_ixml,
    g_ixmldocument               TYPE REF TO if_ixml_document,
    g_ixmlstreamfactory          TYPE REF TO if_ixml_stream_factory,
    g_ixmlstream                 TYPE REF TO if_ixml_istream,
    g_ixmlparser              TYPE REF TO if_ixml_parser,
    g_ixmlnodemainlist        TYPE REF TO if_ixml_node_list,
    g_ixmlnodelistmainelement TYPE REF TO if_ixml_node_list,
    g_sxmldata                TYPE string,
    g_ixmlnode                TYPE REF TO if_ixml_node.
      DATA: wa_xmltab TYPE xstring,
                itab type table of ty-itab.
    OPEN DATASET l_file IN BINARY MODE FOR INPUT MESSAGE v_msg.
    READ DATASET l_file INTO wa_xmltab.
    PERFORM f_create_xmltable USING wa_xmltab
                                  CHANGING v_msg.
    IF NOT v_msg IS INITIAL.
          msg = v_msg.
          EXIT.
        ELSE.
          itab[] = it_xmldata[].
        ENDIF.
    CLOSE DATASET l_file.
    Subroutine to convert xstring to char type ITAB.
    FORM f_create_xmltable USING  value(pi_inputxmlstring) TYPE xstring
                           CHANGING v_msg.
    *-- create the main factory
      g_ixml = cl_ixml=>create( ).
    *-- create the initial document
      g_ixmldocument = g_ixml->create_document( ).
    *-- create the stream factory
      g_ixmlstreamfactory = g_ixml->create_stream_factory( ).
    *create input stream
      g_ixmlstream = g_ixmlstreamfactory->create_istream_xstring( string =
    pi_inputxmlstring ).
    *-- create the parser
      g_ixmlparser = g_ixml->create_parser( stream_factory =
    g_ixmlstreamfactory
                                      istream        = g_ixmlstream
                                      document       = g_ixmldocument ).
    *-- parse the stream
      IF g_ixmlparser->parse( ) NE 0.
    *if parser cannot be created then give error exit
        IF g_ixmlparser->num_errors( ) NE 0.
          EXIT.
        ENDIF.
      ENDIF.
    *-- we don't need the stream any more, so let's close it...
      CALL METHOD g_ixmlstream->close( ).
      CLEAR g_ixmlstream.
    *get the number of main nodes of the XML document
      g_ixmlnodemainlist = g_ixmldocument->get_children( ).
    *set number of elemtns
      g_inummainelements = 0.
      g_imainelementsctr = 0.
      g_inummainelements = g_ixmlnodemainlist->get_length( ).
      g_ifirstlevelctr = 0.
    *loop through the document till all have nodes have been covered.
      WHILE g_ifirstlevelctr LT g_inummainelements.
    *get the first node
        g_ixmlnode = g_ixmlnodemainlist->get_item( g_ifirstlevelctr ).
    *check the type of node
        g_isnodeelement = g_ixmlnode->get_type( ).
    *if node is not of type Element then continue
    *because we have got to read only text from element nodes.
        IF g_isnodeelement NE c_nodeelement.
          g_ifirstlevelctr = g_ifirstlevelctr + 1.
          CONTINUE.
        ENDIF.
    *get nodes of the element just found.
        g_ixmlnodelistmainelement = g_ixmlnode->get_children( ).
    *get number of children of main element
        g_inumchildelements = g_ixmlnodelistmainelement->get_length( ).
    *loop trhough the number of children
        WHILE g_imainelementsctr LT g_inumchildelements.
          g_ixmlnodemainelement = g_ixmlnodelistmainelement->get_item(
        g_imainelementsctr ).
    *get type of node
          g_isnodeelement = g_ixmlnodemainelement->get_type( ).
          IF g_isnodeelement NE c_nodeelement.
            g_imainelementsctr = g_imainelementsctr + 1.
            CONTINUE.
          ENDIF.
    *get name of the node.
          g_selementvalue = g_ixmlnodemainelement->get_name( ).
    *get children of node
          g_childnodelist = g_ixmlnodemainelement->get_children( ).
          g_inumchildren =  g_childnodelist->get_length( ).
          g_ichildelementcounter = 0.
    *while there are number of children of node.loop through
          WHILE g_ichildelementcounter LT g_inumchildren.
    *get the child node
            g_childnode = g_childnodelist->get_item(
    g_ichildelementcounter ).
    *check the type of node
            g_isnodeelement = g_childnode->get_type( ).
    *if node is not of element type continue
            IF g_isnodeelement NE c_nodeelement.
              g_ichildelementcounter = g_ichildelementcounter + 1.
              CONTINUE.
            ENDIF.
    *otherwise get element name
            g_selementname = g_childnode->get_name( ).
    *get value stored in this node.
            g_selementvalue = g_childnode->get_value( ).
            g_numelem = g_inumchildren - 1.
            IF g_ichildelementcounter EQ g_numelem.
              CONCATENATE: g_slinedata g_selementvalue
                      INTO g_slinedata.
            ELSE.
    *      store the value of noide in delimiter ~ line
    *      Check for Invalid characters in file
                IF g_selementvalue CA '&'.
                  REPLACE ALL OCCURRENCES OF '&amp;' IN g_selementvalue WITH
                endif.
    *if value contains delimiter then error
                IF g_selementvalue CA '~'.             
                  V_MSG = text-003.
                  EXIT.
                ELSE.
                  CONCATENATE: g_slinedata g_selementvalue '~'  .
                  INTO g_slinedata.
                ENDIF.
            ENDIF.
    *continue
            g_ichildelementcounter = g_ichildelementcounter + 1.
          ENDWHILE.
          g_ichildelementcounter = 0.
    *increment the main element counter by one to go to the next node
          g_imainelementsctr = g_imainelementsctr  + 1.
    *move the current delimiter line creted to internal table to be given
    *back to the calling program
          MOVE g_slinedata TO wa_xmldata-data.
          APPEND wa_xmldata TO it_xmldata.
          MOVE '' TO g_slinedata.
          MOVE '' TO wa_xmldata-data.
        ENDWHILE.
    *increment counter to move to hte next node.
        g_ifirstlevelctr = g_ifirstlevelctr + 1.
        g_imainelementsctr = 0.
      ENDWHILE.
    ENDFORM.                    "f_create_xmltable
    XML structure
    <?xml version="1.0" encoding="utf-8"?>
    <ABCInbound xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\XYZSchema\ABCInbound.xsd">
    <HH>
    <RecordType>HH</RecordType>
    <Source>ABC</Source>
    <Destination>XYZ</Destination>
    <TimeStamp>20050909220546</TimeStamp>
    </HH>
    <BH>
    <RecordType>BH</RecordType>
    <DocType>AB</DocType>
    <Reference>2205516125</Reference>
    <DocumentDate>20080909</DocumentDate>
    <PostingDate></PostingDate>
    <CompanyCode>ABC</CompanyCode>
    <Currency>INR</Currency>
    <ExchangeRate>1.0000</ExchangeRate>
    <Park></Park>
    <ItemNumber>2</ItemNumber>
    </BH>
    <BL>
    <RecordType>BL</RecordType>
    <Reference>2205516125</Reference>
    <RefLineItem>1</RefLineItem>
    <AcctType>K</AcctType>
    <DrCrIndicator>H</DrCrIndicator>
    <Account>01000003</Account>
    <Amount>364.00</Amount>
    <VendorName-1>TOM &amp; JERRY IS MY</VendorName-1>
    <VendorName-2> NAME TO BE PAID</VendorName-2>
    <VendorName-3>1987566Z</VendorName-3>
    <VendorName-4>22</VendorName-4>
    <Street>UCX STREET</Street>
    <City>ROAD 4</City>
    <PostalCode>515004</PostalCode>
    <Country>IND</Country>
    <ContactPerson></ContactPerson>
    <AlternatePayeeCode></AlternatePayeeCode>
    <AlternatePayeeName-1></AlternatePayeeName-1>
    <AlternatePayeeName-2></AlternatePayeeName-2>
    <AlternatePayeeName-3></AlternatePayeeName-3>
    <PaymentTerms></PaymentTerms>
    <BaselineDate></BaselineDate>
    <PaymentMethods></PaymentMethods>
    <Allocation></Allocation>
    <LineItemText>item text</LineItemText>
    <TaxCode></TaxCode>
    <TaxAmount>0.00</TaxAmount>
    <WHTaxCode></WHTaxCode>
    <WHTaxbase>0.00</WHTaxbase>
    <Fund></Fund>
    <FundCenter></FundCenter>
    <CostCenter></CostCenter>
    <InternalOrder></InternalOrder>
    <TaxAutomatically></TaxAutomatically>
    <SpecialGLIndicator></SpecialGLIndicator>
    </BL>
    <TT>
    <RecordType>TT</RecordType>
    <TotalRecords>1</TotalRecords>
    <TotalValue>222</TotalValue>
    </TT>
    </ABCInbound>
    when the above xml file is read and populated into ITAB, for element vendorname-2 which has a space in first position , that space is ignored.
    This is being used for a FB01 posting and vendor is paid based on Name1+Name2 printed on cheque and due to the space ignoring problem, the vendor name is displayed wrongly thus causing problems.
    I appreciate if someone could guide me thru and help me in solving this problem.
    How to preserve the leading or trailing space.
    g_selementvalue = g_childnode->get_value( ).
    when i check g_selementvalue, space is ignored.
    i will be greateful if someone could guide me through.
    Regards,
    Simha
    Edited by: Simha on Dec 11, 2008 10:49 AM

    0.02: A C C E P T: Request="NEXT"
    0.06: Fetch session state from database
    0.08: ...Check session ... owner
    0.08: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.08: Session: Fetch session header information
    0.08: ...Metadata: Fetch page attributes for application ..., page 330
    0.08: ...Validate item page affinity.
    0.08: ...Validate hidden_protected items.
    0.08: ...Check authorization security schemes
    0.08: Session State: Save form items and p_arg_values
    0.08: ...Session State: Save "P330_PROJECT" - saving same value: ""
    0.09: ...Session State: Saved Item "P330_SHUTTLE" New Value=""
    0.09: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.09: Branch point: BEFORE_COMPUTATION
    0.09: Computation point: AFTER_SUBMIT
    0.09: Tabs: Perform Branching for Tab Requests
    0.09: Branch point: BEFORE_VALIDATION
    0.09: ...Evaluating Branch: BEFORE_VALIDATION type: "REDIRECT_URL" button: 12904321314585385 branch: (Unconditional)
    0.09: Perform validations:
    0.09: ...Item Not Null Validation: P330_SHUTTLE
    0.09: ...Validation did NOT pass
    This is from debugging, what does the point "0.09: ...Session State: Saved Item "P330_SHUTTLE" New Value="" "
    mean ? I think it means, that the Shuttle somehow sets itself to null ?! but i dont understand why...
    There is no computation or anything that deletes the shuttle, the page is quite small, there is not much more than the shuttle and the validations and computations to give default value and transforming the shuttle items into a collection to continue working with the IDs.
    I dont check whats the problem
    Edited by: user12154443 on 21.07.2010 09:47

  • XML Parser Problem

    am using XML parser for PL/SQL in Oracle9i Enterprise Edition Release 9.0.1.1.1
    When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
    SQL> execute domsample('c:\xml', 'family.xml', 'errors.txt');
    begin domsample('c:\xml', 'family.xml', 'errors.txt'); end;
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 22
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 79
    ORA-06512: at "COMMODITYBACKCONNECT.DOMSAMPLE", line 80
    ORA-06512: at line 1
    What need to be done to rectify the above problem.
    when i do the following validation check
    SQL>
    SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
    2 from all_objects
    3 where object_type = 'JAVA CLASS'
    4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser')
    5 ;
    CLASS STATUS
    oracle/xml/parser/v2/DOMParser VALID
    oracle/xml/parser/v2/DOMParser VALID
    Please advice to how remove the following error:
    ORA-20100: Error occurred while parsing: No such file or directory

    Found the solution on metalink. There is a file under /$ORACLE_HOME/javavm/install/init_security.sql
    which needs to be run under username where you are installing xml parser.
    This step is not in readme.txt file provided as a part of download from the OTN website.

  • Create document with PL/SQL xml parser

    Hello,
    I'm trying to create a document with PL/SQL package xmldom on 8.1.7 and write to a file.
    The problem is that my file is empty when it's created.
    Can anyone send me an example of this simple problem or fullfill my example so it's works.
    As you understand I'm new in using XML. :)
    My example is:
    declare
    doc xmldom.DOMDocument;
    n xmldom.DOMNode;
    e xmldom.domelement;
    t xmldom.domtext;
    begin
    doc := xmldom.newdomdocument;
    t := xmldom.createtextnode(doc, 'ROOT');
    n := xmldom.makenode(t);
    doc := xmldom.makedocument(n);
    xmldom.writetofile(doc, 'd:\orant\xdk\plsql\demo\test.xml');
    end;
    Regards
    Hekan

    Your problem may be memory for the JavaVM. Remember, the PL/SQL
    parser uses the Java XML Parser APIs which run in a VM instance.
    Are you running Oracle 8i? If you are you can access our Java
    XML parser loaded in 8i's VM directly from your PL/SQL code.
    That is in fact how our PL/SQL Parser does it.
    Finally, we have no experience loading other XML Parsers into
    Oracle.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Premal Mehta (guest) wrote:
    : Hi,
    : I asked about his a few days back. Pl/SQL parser does not
    work
    : for XML files of size greater then 500Kb. You replied saying
    : that there were no such problem.
    : However whenever I try, either I get some exception or
    Pl/SQL
    : crashes due to memory error. I am clueless. Is there some
    : setting that I can do to get away with the problem? Please
    : guide...
    : Also, tell me about the alternatives.
    : Can I write code in Java and load these class filesin Oracle
    : and then reference these classes from Pl/SQL code. Can I load
    : any other parser for Java in Oracle.
    : Looking forward for help...
    : Premal.
    null

  • XML parsing problem

    Hi, my problem is :
    In my Application i want to parse an XML file with DOM parser. The problem is that in my Project "MyProject -> Project Properties -> Libraries and Classpath"
    I have included some 15 libraries which are useful for my Application: ADF Faces Runtime 11, ADF Web Runtime and etc.
    Problems are causing the libraries: BC4J Runtime,ADF Model Runtime, MDS Runtime Dependencies
    because when added my source which is parsing an XML file stops working.The source code is:
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    File file =
    new File("C:\\Documents and Settings\\ilia\\Desktop\\begin.xml");
    Document doc = db.parse(file);
    Element root = doc.getDocumentElement();
    NodeList dots = root.getElementsByTagName("w:t");
    Element firstDot = (Element)dots.item(0);
    String textValue = firstDot.getFirstChild().getNodeValue();
    I use DOM because i need to change some values in the XML file, but its not working neither for reading nor for writing.When debugging I see that it gets the root of the xml but " firstDot.getFirstChild().getNodeValue() " returns null and it breaks with NullPointerException. And that's only when the libraries mentioned above are added to the project. Without them it works just fine !
    I don't know, it's like when added the parser validates my xml against some schema and returns null.
    The xml file is very simple MS Word Document saved as .xml .But I don't think that's the problem.
    Thanks in advance !
    iliya

    Hi all,
    I found the solution to my problem.The right way to parse and change an XML file with DOM parser using the Oracle XML Parser v2 should look like this:
    JXDocumentBuilderFactory factory =
    (JXDocumentBuilderFactory)JXDocumentBuilderFactory.newInstance();
    JXDocumentBuilder documentBuilder =
    (JXDocumentBuilder)factory.newDocumentBuilder();
    File file = new File("c:/Documents and Settings/ilia/Desktop/begin.xml");
    InputStream input =
    new FileInputStream(file);
    XMLDocument xmlDocument = (XMLDocument)(documentBuilder.parse(input));
    System.out.println("Encoding: " + xmlDocument.getEncoding());
    System.out.println("Version: " + xmlDocument.getVersion());
    NodeList namespaceNodeList =
    xmlDocument.getElementsByTagNameNS("http://schemas.microsoft.com/office/word/2003/wordml","t");
    XMLElement namespaceElement17 = (XMLElement)namespaceNodeList.item(17);
    namespaceElement17.getFirstChild().setNodeValue("someString");

  • PL/SQL XML Parser Error

    Hello,
    I just set up the PL/SQL parser and created a procedure and am getting the following error. I am a new developer so any help would be greatly appreachiated. Thanks
    ERROR at line 1:
    ORA-29541: class XML_WORK.oracle/xml/parser/plsql/XMLParserCover could not be resolved
    ORA-06512: at "XML_WORK.XMLPARSERCOVER", line 0
    ORA-06512: at "XML_WORK.XMLPARSER", line 57
    ORA-06512: at line 14

    Steve,
    I did as you said and now get the following errors:
    ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.net.SocketPermission business.buffalo.edu resolve) has not been granted by dbms_java.grant_permission to SchemaProtectionDomain(XML_WORK|PolicyTableProxy(XML_WORK))
    ORA-06512: at "XML_WORK.XMLPARSERCOVER", line 0
    ORA-06512: at "XML_WORK.XMLPARSER", line 46
    ORA-06512: at "XML_WORK.XML_PARSE_TEST", line 19
    ORA-06512: at line 2
    I created the allow_url_access procedure and the result of the test query appear fine. The url I am using is: http://business.buffalo.edu/hrs/AlfCMTestXML.xml and the results of the test query is as follows. Thanks.
    ALLOWED_SERVER_NAME
    *.buffalo.edu
    *.business.buffalo.edu

  • XML parser Problem in Oracle 9iAS

    Dear All,
    I am trying to parse a xml file by using a SAX Parser.
    I am getting error "oracle.xml.parser.v2.XMLParseException: Invalid InputSource.'. I have already included 'xerces.jar' in the classpath.
    But it is always taking oracle xml parser.
    How to change the default XML parser in Oracle 9ias.
    This is my report.jsp File
    &lt;%@ page import="java.io.*,java.util.*,java.sql.*,javax.sql.*,javax.naming.*,javax.jms.*,iims.util.*,javax.xml.parsers.*,org.xml.sax.*,org.xml.sax.helpers.*, org.w3c.dom.*"%&gt;
    &lt;%
    generateTree();
    %&gt;
    &lt;%!
         //This method is to be called during startup. It will generate the template and rule nodes.
         public static void generateTree() throws Exception
              //Proceed with this method if the template and rule trees are not built already.
              //if (nodeTemplate != null && nodeRule != null) return;
              // Validate
              Node nodeRule = parseXml("d:\\ora9ias\\j2ee\\home\\Reports\\IIMSReportsTemplate1.xml");
         }//generateTree
    %&gt;
    &lt;%!
         //parse the input file and return a node.
         private static Node parseXml(String fileName) throws Exception
              //Parse the input file
              Document objDocument = null;
              DocumentBuilder objDocumentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
              objDocument = objDocumentBuilder.parse(fileName);
              Node nodeRet = objDocument;
              return nodeRet;
         }//parseXml
    %&gt;
    Report template:
    &lt;ROOT&gt;
         &lt;HEADINGS&gt;
              &lt;HEADING1&gt;H1&lt;/HEADING1&gt;
              &lt;HEADING2&gt;H2&lt;/HEADING2&gt;
              &lt;HEADING3&gt;H3&lt;/HEADING3&gt;
              &lt;HEADING4&gt;H4&lt;/HEADING4&gt;
              &lt;HEADING5&gt;H5&lt;/HEADING5&gt;
              &lt;HEADING6&gt;H6&lt;/HEADING6&gt;
         &lt;/HEADINGS&gt;
         &lt;ROWSETS&gt;
              &lt;ROWSET&gt;
                   &lt;COLHDRS&gt;
                   &lt;/COLHDRS&gt;
                   &lt;ROWS&gt;
                   &lt;/ROWS&gt;
              &lt;/ROWSET&gt;
         &lt;/ROWSETS&gt;
         &lt;Footer&gt;
              &lt;PageNo&gt;Generate&lt;/PageNo&gt;
              &lt;Date&gt;SystemDate&lt;/Date&gt;
         &lt;/Footer&gt;
    &lt;/ROOT&gt;
    Stack Trace:
    strRuleFileD:\ora9ias\j2ee\home\Reports\IIMSReportsRules.xml
    oracle.xml.parser.v2.XMLParseException: Invalid InputSource.
    at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:145)
    at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:208)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:140)
    at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:96)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:165)
    at iims.REPORTS.IIMSGenerateReport.parseXml(IIMSGenerateReport.java:115)
    at iims.REPORTS.IIMSGenerateReport.generateTree(IIMSGenerateReport.java:
    100)
    at iims.REPORTS.IIMSGenerateReport.buildXML(IIMSGenerateReport.java:147)
    at PCREPORT_PROCESS.processBody(PCREPORT_PROCESS.java:3248)
    at PCREPORT_PROCESS.doPost(PCREPORT_PROCESS.java:100)
    at PCREPORT_PROCESS.doGet(PCREPORT_PROCESS.java:92)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:244)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterC
    hain.java:59)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
    stDispatcher.java:523)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
    vletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
    tHandler.java:735)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java
    :151)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Please advise.
    Thanks
    Siva Kishor Rao U

    Adding Xerces XML parser is not enough to make it work. Since some version of JDK (I think 1.4.X) XML parser is included and for older version it can be setup like a runtime option. And this is probably how ORACLE is using its XML parser. If you want to use different parser, you have to pass runtime option to JVM - for Xalan it looks like this:
    -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
    ...this way it becomes default parser factory used by javax interface functions. Look for documentation on xml.apache.org
    Myrra

  • Faces-config.xml XML parser problem ???

    I'm taking below error message when I was opening faces-config.xml file with diagram view, what's the exact solution of this problem???
    Message
    BME-99100: An error has been reported from the XML parser
    Cause
    The parse has reported the following error:
    <Line 24, Column 2>: XML-20201: (Fatal Error) Expected name instead of <.
    Action
    Thanks for all...
    Message was edited by:
    user559176

    I looked very well, there was'nt any error on line 24 about "<", I think if the size of faces-confic.xml file increased JDeveloper XML Parser cannot parse with high file size, what're other solutions?

Maybe you are looking for

  • Installing Oracle 10g enterprise edition on Win XP professional

    Hello everybody, I have the LAN's ip address set to 192.168.0.5 during installation. In addition, I'm using WiFi to connect to the internet at the same time - is this going to cause a confusion on the host ip because I have LAN and WiFi turned on? I

  • ACH Payment Advice problem while printing

    hi, I am using Print program rffous_t and custimized form Z_F110_US_AVIS BY COPYING F110_US_AVIS. My problem is while debugging i am getting the values from the driver program.but in print out i am getting 'XXXXXXXXXXXXXX' for all driver program valu

  • Digital signature details "translation"

    Hi, my request is quite simple, i need to translate the language for the default strings used by Livecycle DS ES2 in digital signatures. For Example: Digitally signed by: John doe Date: xx/xx/xxxx I'd like to translate the strings "Digitally signed b

  • Why doesn't G510n print photos with premium photo paper

    I just received the G510n Wireless for Christmas.  I tried printing a Photo on Premium Photo Paper and it does not come out.  I can't find Photo Ink for this printer.  Doesn't this printer have the capability to print Photos on Photo Paper? This ques

  • Mac book crashed restart screen OS  Utilities please help

    My cursor froze and upon restart screen OS  Utilities appears please help