External entity reference while parsing DTD

I am using Oracle 8.1.7 to parse a DTD using xmlparser in PL/SQL.
My DTD references external entities. Now the question is how to let the parser know the location of these external entities.
setBaseURL and setBaseDir doe not seem to work. I have to tell the parser to look for all necessary entities in a particular folder. Can somebody answer with a sample code for this problem.
Any Idea' would be highly appreciated.
Regards,
Prakash

Hey Niels...
That *shouldn't* be happening if you're using an unmodified FM8 install .. especially with creating a new file. It sounds like something has gone awry in your install. This will often happen if the doctype declaration in the XML file is defined as a system resource rather than with a public ID (but that shouldn't be happening unless you're creating the file with another editor or using a file created by someone else).
Some things to check ..
- Open the DITA > Options dialog .. is "DITA-Topic-FM" selected as the "Topic application"?
- When you open a file from disk, do you select "DITA-Topic-FM" as the structure application? (You may not get an option to do so .. that's OK.)
- Choose .. Structure Tools > Edit Application Definitions .. locate the XMLApplication node that is labeled "DITA-Topic-FM" .. below that you'll see entries for Template, DTD, and Read/write rules. Check that the files specifed actually exist at the locations specified (note that "$STRUCTDIR" maps to the FrameMaker/Structure/ folder).
- Have you installed FrameMaker in a "nonstandard" location?
I may be missing something obvious, but this is probably a good start.
Cheers,
...scott

Similar Messages

  • "Error in processing external entity reference" - why?

    -- FM 8.0p277, structured --
    Saddened to see this morning that FM apparently decided against saving the work I did yesterday afternoon ... I can sympathise with the idea of not saving imperfect documents, but it could at least have warned me!
    First attempt at saving this morning throws up the following message.
    ] XML Parser Messages (Document Prolog)
    ] Error at file P:\ACM\smu\ditabase.dtd, line 71, char 17, Message: Could not open external entity 'P:\ACM\smu\indexingDomain.ent'
    ] Parse error at line 71, char 0: Error in processing external entity reference
    * I certainly haven't created any .dtd, so where might this defective file have come from?
    * ditto for defining entities
    So - what's the root problem, and how do I set about correcting it?
    [ps] I get exactly the same message when I use the FM DITA menu to create a brand-new topic.

    Hey Niels...
    That *shouldn't* be happening if you're using an unmodified FM8 install .. especially with creating a new file. It sounds like something has gone awry in your install. This will often happen if the doctype declaration in the XML file is defined as a system resource rather than with a public ID (but that shouldn't be happening unless you're creating the file with another editor or using a file created by someone else).
    Some things to check ..
    - Open the DITA > Options dialog .. is "DITA-Topic-FM" selected as the "Topic application"?
    - When you open a file from disk, do you select "DITA-Topic-FM" as the structure application? (You may not get an option to do so .. that's OK.)
    - Choose .. Structure Tools > Edit Application Definitions .. locate the XMLApplication node that is labeled "DITA-Topic-FM" .. below that you'll see entries for Template, DTD, and Read/write rules. Check that the files specifed actually exist at the locations specified (note that "$STRUCTDIR" maps to the FrameMaker/Structure/ folder).
    - Have you installed FrameMaker in a "nonstandard" location?
    I may be missing something obvious, but this is probably a good start.
    Cheers,
    ...scott

  • Getting incorrect err message while parsing DTD

    Hi,
    When I try to parse the DTD given below, the DomParser reports a
    SAXException
    <!ELEMENT DataArea (Workers)>
    <!ELEMENT Workers (Worker*)>
    <!ELEMENT Worker (Age?,Lodging?,Skills?)>
    <!ATTLIST Worker
    WorkerName CDATA #REQUIRED>
    <!ELEMENT WorkerName (#PCDATA)>
    <!ELEMENT Age (#PCDATA)>
    <!ELEMENT Lodging (#PCDATA)>
    <!ELEMENT Skills (Skill*)>
    <!ELEMENT Skill (SkillName,Ability?,Description*)>
    <!ELEMENT SkillName (#PCDATA)>
    <!ELEMENT Ability (#PCDATA)>
    <!ELEMENT Description EMPTY>
    <!ATTLIST Description
    SkillDescription CDATA #IMPLICIT>
    <!ELEMENT SkillDescription (#PCDATA)>
    This is the exception
    Attribute value should start with quote.
    at oracle.xml.parser.v2.XMLError.flushErrors
    (XMLError.java:201)
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:107)
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:145)
    at
    oracle.xml.parser.v2.NonValidatingParser.parseAttrValue
    (NonValidatingParser.java:1156)
    at oracle.xml.parser.v2.ValidatingParser.parseAttlistDecl
    (ValidatingParser.java:297)
    at
    oracle.xml.parser.v2.NonValidatingParser.parseMarkupDecl
    (NonValidatingParser.java:454)
    at oracle.xml.parser.v2.NonValidatingParser.parseDTD
    (NonValidatingParser.java:166)
    at oracle.xml.parser.v2.DOMParser.parseDTD
    (DOMParser.java:282)
    at oracle.apps.ero.xml.XmlPseudoDom.readCanonicalXmlv2
    (XmlPseudoDom.java:804)
    at
    oracle.apps.ero.xml.test.XmlFrameworkTester.testXmlPseudoDom
    (XmlFrameworkTester.java:137)
    at oracle.apps.ero.xml.test.XmlFrameworkTester.main
    (XmlFrameworkTester.java:21)
    The code snippet that causes this exception is given below.
    DOMParser dp=new DOMParser();
    dp.setValidationMode(true);
    String dtd=getDTD(rootVO);
    Diagnostic.println("Attempting to Validate inbound xml
    against DTD:\n"+dtd);
    try
    dp.parseDTD(new StringReader(dtd),XML_ROOT_ELEMENT_NAME);
    Is this behaviour a known bug? Is there any known workaround?
    null

    Keki Burjorjee (Oracle) (guest) wrote:
    : Hi,
    : When I try to parse the DTD given below, the DomParser reports
    a
    : SAXException
    : <!ELEMENT DataArea (Workers)>
    : <!ELEMENT Workers (Worker*)>
    : <!ELEMENT Worker (Age?,Lodging?,Skills?)>
    : <!ATTLIST Worker
    : WorkerName CDATA #REQUIRED>
    : <!ELEMENT WorkerName (#PCDATA)>
    : <!ELEMENT Age (#PCDATA)>
    : <!ELEMENT Lodging (#PCDATA)>
    : <!ELEMENT Skills (Skill*)>
    : <!ELEMENT Skill (SkillName,Ability?,Description*)>
    : <!ELEMENT SkillName (#PCDATA)>
    : <!ELEMENT Ability (#PCDATA)>
    : <!ELEMENT Description EMPTY>
    : <!ATTLIST Description
    : SkillDescription CDATA #IMPLICIT>
    : <!ELEMENT SkillDescription (#PCDATA)>
    : This is the exception
    : Attribute value should start with quote.
    : at oracle.xml.parser.v2.XMLError.flushErrors
    : (XMLError.java:201)
    : at oracle.xml.parser.v2.XMLError.error(XMLError.java:107)
    : at oracle.xml.parser.v2.XMLError.error(XMLError.java:145)
    : at
    : oracle.xml.parser.v2.NonValidatingParser.parseAttrValue
    : (NonValidatingParser.java:1156)
    : at oracle.xml.parser.v2.ValidatingParser.parseAttlistDecl
    : (ValidatingParser.java:297)
    : at
    : oracle.xml.parser.v2.NonValidatingParser.parseMarkupDecl
    : (NonValidatingParser.java:454)
    : at oracle.xml.parser.v2.NonValidatingParser.parseDTD
    : (NonValidatingParser.java:166)
    : at oracle.xml.parser.v2.DOMParser.parseDTD
    : (DOMParser.java:282)
    : at oracle.apps.ero.xml.XmlPseudoDom.readCanonicalXmlv2
    : (XmlPseudoDom.java:804)
    : at
    : oracle.apps.ero.xml.test.XmlFrameworkTester.testXmlPseudoDom
    : (XmlFrameworkTester.java:137)
    : at oracle.apps.ero.xml.test.XmlFrameworkTester.main
    : (XmlFrameworkTester.java:21)
    : The code snippet that causes this exception is given below.
    : DOMParser dp=new DOMParser();
    : dp.setValidationMode(true);
    : String dtd=getDTD(rootVO);
    : Diagnostic.println("Attempting to Validate inbound xml
    : against DTD:\n"+dtd);
    : try
    : dp.parseDTD(new StringReader(dtd),XML_ROOT_ELEMENT_NAME);
    : Is this behaviour a known bug? Is there any known workaround?
    The reason for the error is a problem in your DTD. You should
    have <!ELEMENT Worker(Workername, Age?, Lodging?, Skills?)>
    instead of only <!ELEMENT Worker(Age?, Lodging?, Skills?)>.
    Further down, it's similar for !ELEMENT Skill, in which
    SkillDescription should be added.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • XML Parsong error error in processor external entity reference location chrome://messenger/content/messenger compose/messenger compose. xul line 11 column 3

    Receive messages ok but when hitting "write"button the above message appears. No joy with Google

    tried restarting with add-ons disabled from the help menu? It is probably add-on related.

  • XMLType and External Entity Resolving

    When I try to insert an XML Document like
    my table "xmltest" have only one column from type XMLType.
    insert into xmltest(xmlType('<?xml version="1.0" encodeing="ISO-8859-1"?>
    <!DOCTYPE test PUBLIC "/home/oracle/test.dtd"><test>&amp;auml;</test>'));
    i become an Error
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00226: entity "auml" is not declared
    Error at line 2
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    my question is
    is it possible to declare external Entity references in a DTD File, and how i can bind the xmldata to that DTD File
    i dont want to put the Entity Declaration into the xmlDocument (as inline DTD)
    kind regards
    jan

    Yes,
    outside from XML DB i can parse the file,
    it parse also with PL/SQL
    but there, the DTD is under an apache URL (http://apachehost/dtd/test.dtd) and dont need Authentification.
    in this conjunction the DTD is under "http://testhost:8080/public/test.dtd" and need Authentication and also i think that the XmlType parsing failed.
    I have try´d out to Access the DTD with
    select xdburitype('http://testhost:8080/public/test.dtd').getClob() from dual;
    i get an error with Access Denied
    with
    select utl_http.request('http://testhost:8080/public/test.dtd').getClob() from dual;
    i get the File
    The test.dtd was placed with Windows OS over the WebDav function. The file can be accessed from outside the XML DB with Authentication
    My Question are
    - must this resource explicit registered in the XML DB
    - can this happends on other things
    - how i can set the Accessability from the resource
    for additional
    i have the Oracle 9i Enterprise Edition Release 9.2.0.1.0 (Downloaded from website)
    with SuSe Linux 9.0

  • EXTERNAL Entity refrence creation (XML)

    Hi All
    I am creation the XML file using SAP XML DOM Libarary objects.
    My requirement is to create the EXTERNAL ENTITY file reference using DOCTYPE tag.
    For Example
    <;!DOCTYPE descriptSol [
    <;!ENTITY % references SYSTEM "P_899200_SD01_01.ref">;
    %references
    ]>
    I am using following method to create it
    lo_doc_type                 TYPE REF TO if_ixml_document_type,
    lo_entity_dec               TYPE REF TO if_ixml_entity_decl,
              CALL METHOD go_document->;create_document_type
                EXPORTING
                  name =  'descriptSol'
                RECEIVING
                  rval = lo_doc_type.
              CALL METHOD go_document-&gt;set_document_type
                EXPORTING
                  document_type = lo_doc_type.
              CALL METHOD lo_doc_type->create_ext_entity_decl
                EXPORTING
                  is_parameter_entity = 'X'
                  name                = 'references'
                  notation            = ''
                  public_id           = ''
                  system_id           = 'P_899200_SD01_01.ref'
                RECEIVING
                  rval                = lo_entity_dec
              CALL METHOD lo_doc_type->append_child
                EXPORTING
                  new_child = lo_entity_dec
                RECEIVING
                  rval      = lw_rval.
    The Above code is working and creating following tag
    <;!DOCTYPE descriptSol [
    <!ENTITY % references SYSTEM "P_899200_SD01_01.ref">;
    ]>;
    So % references at end of declaration is missing.
    This type of entity is called as "EXTERNAL (PARSED) PARAMETER ENTITY Declaration".
    Give your suggestions that whether i am using right method to created EXternal entity reference.
    Thanks in advance
    Sukhjinder Singh

    Oracle XML Team wrote:
    : Jie (guest) wrote:
    : : I added an external entity in sample file class.xml
    : : <!ENTITY SYSTEM class2 "class2.xml">
    : : &class2;
    : : Then I created a file class2.xml in the same directory and
    run
    : : the program
    : : java SAXSample class.xml
    : : I got the following error messages at the end of the output
    : : ResolveEntity: null file:/D:/oxml/sample/class2.xml
    : : Locator:null file:/D:/oxml/sample/class1.xml 24 9
    : : Fatal error
    : : Expected encoding instead of ?>
    : : Did I do something wrong?
    : : Thanks,
    : : Jie
    : What parse method are you using? Also the correct syntax should
    : be:
    : <!ENTITY class2 SYSTEM "class2.xml">.
    : Oracle XML Team
    : http://technet.oracle.com
    : Oracle Technology Network
    Sorry for my typo. I did use the correct syntax in my example
    file. I didn't write any code. I just try to use the example
    program "SAXSample" you provide in the sample directory, that is,
    I was trying to use SAX API to parse a file which contains an
    external entity.
    null

  • ORA-20100: Error occurred while parsing:Error opening external DTD ( Asap)

    Hi I'm using domsample example. And I have written the program. The xml file at the starting has this string"<!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">", from which I'm getting error -"ORA-20100: Error occurred while parsing: Error opening external DTD".
    I'm new to xml could you please help me to solve this problem. I assume this is related to DTD for which I need to set base path. But I'm not sure how to do it? I'm getting this xml file through CLOB which I'm able to parse until an extent. where in between got this error.
    Here is my partial code:
    l_doc_id := rec_xml_data.id;
    l_xml_parser := xmlparser.newParser;
    xmlparser.setValidationMode(l_xml_parser, FALSE);
    xmlparser.parseCLOB(l_xml_parser,rec_xml_data.l_xml_data);--PARSING THE CLOB WHICH CONTAINS XML FILE
    l_xml_doc := xmlparser.getDocument(l_xml_parser);
    xmlparser.freeParser(l_xml_parser);
    l_nodelist := xmldom.getElementsByTagName(l_xml_doc, '*');
    l_length := xmldom.getLength(l_nodelist);
    -- loop through elements
    FOR l_rec_xml in 0..l_length-1
    LOOP
    l_node := xmldom.item(l_nodelist, l_rec_xml);
    -- dbms_output.put(xmldom.getNodeName(n) || ' ');
    -- get the text node associated with the element node
    l_nodename:=xmldom.getNodeName(l_node);
    l_node := xmldom.getFirstChild(l_node);
    IF (xmldom.isNull(l_node) = false) THEN
    IF xmldom.getNodeType(l_node) = xmldom.TEXT_NODE THEN
    IF l_nodename = 'purchase-order-number' THEN
    l_po_num:=NULL;
    l_po_num:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Purchaser Order Num : '||l_po_num);
    END IF;
    from here onwards I get the string values
    Now I don't know where to set the DTD basepath or baseurl. I need it asap.
    Regards,
    Naveen.

    The version which I'm working on is 10.2.0.4.
    XML File---
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    <MobileInventoryResponse>
    <message>
    <message-header>
    <message-id>16244182</message-id>
    <transaction-name>ship-advice</transaction-name>
    <partner-name>cbeyond</partner-name>
    <source-url>http://www.brightpoint.com</source-url>
    <create-timestamp>20080826150709</create-timestamp>
    <response-request>1</response-request>
    </message-header>
    <ship-advice>
    <header>
    <customer-id>297859</customer-id>
    <shipment-information>
    <ship-first-name>RA_13Aug_1</ship-first-name>
    <ship-last-name>MIND</ship-last-name>
    <ship-address1>test</ship-address1>
    <ship-city>test</ship-city>
    <ship-state>VA</ship-state>
    <ship-post-code>22102-4931</ship-post-code>
    <ship-country-code>US</ship-country-code>
    <ship-phone1>0040726335068</ship-phone1>
    <ship-email>[email protected]</ship-email>
    <ship-via>FX01</ship-via>
    <ship-request-date>20080826</ship-request-date>
    <ship-request-warehouse>CBY1</ship-request-warehouse>
    </shipment-information>
    <purchase-order-information>
    <purchase-order-number>380928</purchase-order-number>
    <account-description />
    <purchase-order-amount>0.0</purchase-order-amount>
    <currency-code>USD</currency-code>
    </purchase-order-information>
    <order-header>
    <customer-order-number>0002759</customer-order-number>
    <customer-order-date>20080826</customer-order-date>
    <order-sub-total>19.0</order-sub-total>
    <order-discount>0.0</order-discount>
    <order-tax1>0.0</order-tax1>
    <order-tax2>0.0</order-tax2>
    <order-tax3>0.0</order-tax3>
    <order-shipment-charge>18.0</order-shipment-charge>
    <order-total-net>0.0</order-total-net>
    <order-status>Completed</order-status>
    <order-type />
    <brightpoint-order-number>35028788</brightpoint-order-number>
    <warehouse-id>CBY1</warehouse-id>
    <ship-date>20080826</ship-date>
    </order-header>
    </header>
    <detail>
    <line-item>
    <line-no>1</line-no>
    <item-code>SKU1</item-code>
    <universal-product-code>0</universal-product-code>
    <ship-quantity>1.0</ship-quantity>
    <unit-of-measure>EA</unit-of-measure>
    <serial-list>
    <serial-numbers>
    <esn>TIMI000013</esn>
    </serial-numbers>
    </serial-list>
    <line-status />
    <base-price>0.0</base-price>
    <line-discount>0.0</line-discount>
    <line-tax1>0.0</line-tax1>
    <line-tax2>0.0</line-tax2>
    <line-tax3>0.0</line-tax3>
    <bill-of-lading>929406733828</bill-of-lading>
    <scac>FX01</scac>
    </line-item>
    </detail>
    </ship-advice>
    <transactionInfo>
    <eventID>16244182</eventID>
    </transactionInfo>
    </message>
    </MobileInventoryResponse>
    XML FILE END--------------------
    MY PROGRAM IS AS BELOW---
    get_eai_data_prc( x_ret_code OUT NUMBER
    ,p_debug_flag IN VARCHAR2
    IS
    --Local Variables
    l_xml_parser xmlparser.Parser;
    l_xml_doc xmldom.DOMDocument;
    l_xml_data CLOB;
    l_nodelist xmldom.DOMNodeList;
    l_length NUMBER := 0;
    l_num_cnt NUMBER := 0;
    l_node xmldom.DOMNode;
    l_docelem DBMS_XMLDOM.DOMElement; -- XML DOM element.
    l_nodeValue VARCHAR2(30); -- Text value of the node.
    l_nodename VARCHAR2(100);
    l_po_num VARCHAR2(150);
    l_account_desc VARCHAR2(150);
    l_cust_ord VARCHAR2(150);
    l_ship_date VARCHAR2(150);
    l_item_code VARCHAR2(150);
    l_ship_qty VARCHAR2(150);
    l_esn VARCHAR2(150);
    l_cust_channel_type VARCHAR2(150);
    l_cust_grp_acct VARCHAR2(150);
    l_max_doc_id NUMBER;
    l_doc_id NUMBER;
    l_market_id VARCHAR2(150);
    l_record_id VARCHAR2(30);
    TYPE l_esn_table IS TABLE OF VARCHAR2(30)
    INDEX BY BINARY_INTEGER;
    l_data l_esn_table;
    --CURSOR TO GET XML DATA FROM EAI
    CURSOR cur_xml_data(p_doc_id VARCHAR2)
    IS
    SELECT id
         ,document l_xml_data
    FROM tds_xml_store_temp
    WHERE id >= id ;
    BEGIN
    FOR rec_xml_data IN cur_xml_data(l_max_doc_id)
    LOOP
    l_doc_id := rec_xml_data.id;
    l_xml_parser := xmlparser.newParser;
    xmlparser.setValidationMode(l_xml_parser, FALSE);
    xmlparser.parseCLOB(l_xml_parser,rec_xml_data.l_xml_data);
    l_xml_doc := xmlparser.getDocument(l_xml_parser);
    xmlparser.freeParser(l_xml_parser);
    l_nodelist := xmldom.getElementsByTagName(l_xml_doc, '*');
    l_length := xmldom.getLength(l_nodelist);
    -- loop through elements
    FOR l_rec_xml in 0..l_length-1
    LOOP
    l_node := xmldom.item(l_nodelist, l_rec_xml);
    -- dbms_output.put(xmldom.getNodeName(n));
    -- get the text node associated with the element node
    l_nodename:=xmldom.getNodeName(l_node);
    l_node := xmldom.getFirstChild(l_node);
    IF (xmldom.isNull(l_node) = false) THEN
    IF xmldom.getNodeType(l_node) = xmldom.TEXT_NODE THEN
    IF l_nodename = 'purchase-order-number' THEN
    l_po_num:=NULL;
    l_po_num:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Purchaser Order Num : '||l_po_num);
    END IF;--purchase-order-number
    IF l_nodename = 'account-description' THEN
    l_account_desc :=NULL;
    l_account_desc := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-channel-type' THEN
    l_cust_channel_type:=NULL;
    l_cust_channel_type:= xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-group-account' THEN
    l_cust_grp_acct := NULL;
    l_cust_grp_acct := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-order-number' THEN
    l_cust_ord:=NULL;
    l_cust_ord:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Customer Order NUm : '||l_cust_ord);
    END IF;--customer-order-number
    IF l_nodename = 'ship-date' THEN
    l_ship_date:=NULL;
    l_ship_date:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Ship Date : '||to_date(l_ship_date,'YYYY-mm-dd'));
    END IF;--ship-date
    IF l_nodename = 'item-code' THEN
    l_item_code:=NULL;
    l_item_code:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Item Code : '||l_item_code);
    END IF;--item-code
    IF l_nodename = 'esn' THEN
    l_esn:=NULL;
    l_num_cnt := l_num_cnt + 1;
    l_esn:=xmldom.getNodeValue(l_node);
    l_data(l_num_cnt) := l_esn;
    -- dbms_output.put_line('Serial Num : '||l_esn);
    END IF;--esn
    IF l_nodename = 'market-id' THEN
    l_market_id := NULL;
    l_market_id := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'ship-quantity' THEN
    l_ship_qty:=NULL;
    l_ship_qty:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Ship Quantity : '||l_ship_qty);
    END IF;--ship-quantity
    END IF;--xmldom.TEXT_NODE
    END IF;
    END LOOP;--l_rec_xml
    FOR j in l_data.first..l_data.last
    LOOP
    INSERT INTO cbey_shipment_int_stg( purchase_order_number
    ,account_description
    ,customer_order_number
    ,ship_date
    ,item_code
    ,ship_quantity
    ,esn
    ,customer_channel_type
    ,customer_group_account
    ,market_id
    ,eai_xml_doc_id
    ,record_status
    ,record_id
    VALUES
    ( l_po_num
    ,l_account_desc
    ,l_cust_ord
    ,to_date(l_ship_date,'YYYY-mm-dd')
    ,l_item_code
    ,l_ship_qty
    ,l_data(j)
    ,l_cust_channel_type
    ,l_cust_grp_acct
    ,l_market_id
    ,l_max_doc_id
    ,'NEW'
    ,CBEY_RECORD_ID_SEQ_S.nextval
    END LOOP;--j
    UPDATE cbey_interface_run_log
    SET request_id = l_conc_req_id
    ,lastrun_date = SYSDATE
    ,doc_id = rec_xml_data.id
    WHERE program_id = 'SHIPMENT_INT'
    AND doc_id =l_max_doc_id;
    l_data.delete;
    l_num_cnt :=0;
    END LOOP; --rec_xml_data
    COMMIT;
    END of the Procedure--------------------------
    Now if I load the xml file without the this :- <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    it works well. But it gives error when this particular thing is there.
    Regards,
    Naveen
    Edited by: MAN on Oct 17, 2008 7:28 AM

  • Problem in parsing-invalid use of a parameter entity reference

    Hi
    I am getting an error in parsing the xml message. The first few lines of DTD are as follows.
    <!ENTITY % contractIdentifier "contractRef , branch">
    <!ENTITY % ccyDetails "amount , settlementDate , dealRate">
    <!ENTITY % schedule "count , schedule">
    <!ENTITY % paymentDetails "payIndicator , ourPayAccount , theirAgent ,
    theirAgentsAgent , beneficiaryAccount , receiveIndicator , ourReceiveAccount
    , suppressCable , suppressConfirmation , pvpIndicator">
    <!ENTITY % commonCore "%paymentDetails; , narrative* , abaNumber ,
    cleanRiskIndicator , creditLine , directSent , federalFundsFlag , chipsCode
    , riskTakingUnit">
    I am getting the error as
    invalid use of a parameter entity reference line no 5.
    Can somebody help me
    Thanks
    Prashant

    Parameter entity references may not be used within markup in an internal DTD.
    To use a DTD with parameter entity reference use a external DTD.

  • Howto force Oracle XML parser not to expand entity references?

    Hi,
    Is it possible to force Oracle XML parser (Java) not to expand entity references, so that they appear in DOM tree as separated nodes after parsing XML?
    Example:
    for following XML
    <tag>abc&auml;xyz</tag>
    I get:
    Element: "tag"
    |-Text: "abcdxyz"
    but I would like to get:
    Element: "tag"
    |-Text: "abc"
    |
    |-EntityReference: "auml"
    |
    |-Text: "xyz"
    I've already tried to use JAXP api (setExpandEntityReferences method in java.xml.parsers.DocumentBuilderFactory), but it doesn't seem to work.
    I'm using parser from XDK Java v9.2.0.2.0 Production.
    Thx,
    James

    This is requested code sample:
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setExpandEntityReferences(false);
    System.out.println("isExpandEntityReferences = "+dbf.isExpandEntityReferences());
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document d = db.parse("file://c:/test.xml");
    Element e = d.getDocumentElement();
    System.out.println("documentElement"+ e.getTagName() + " nodeType=" +e.getNodeType());
    System.out.println("ChildNodes:");
    NodeList nodeList = e.getChildNodes();
    for(int i=0; i<nodeList.getLength();i++) {
    System.out.println(i+" value=\""+nodeList.item(i).getNodeValue()+"\" nodeType="+nodeList.item(i).getNodeType());
    Content of test.xml:
    <!DOCTYPE test SYSTEM "test.dtd">
    <test>abc&auml;xyz</test>
    Content of test.dtd:
    <!ELEMENT test (#PCDATA)>
    <!ENTITY auml "&#x00E4;">
    When you run it you will get the following output:
    isExpandEntityReferences = true
    documentElementtest nodeType=1
    ChildNodes:
    0 value="abcdxyz" nodeType=3
    which means that EntityReference has been expanded.
    As you can see in the output the isExpandEntityReferences method returns "true", even though I set it to false in code!
    Does it mean that Oracle parser simple doesn't support this feature???
    Thx,
    James

  • Random Bingads WSDL errors: Parsing WSDL: Couldn't load from...failed to load external entity, Could not connect to host, Parsing Schema: can't import schema from

    Hi,
    I am developing a web tool that accesses client's Bingads accounts via OAUTH2 granting. I am downloading data from clients daily.
    Generally it worked, but for 2 days I am experiencing a weird issue, that in random times (but more and more often though) I receive random error messages from Bing server. I am pasting below a few example from my logs (with timestamp and request/response).
    Must note that I launch these requests from the server where we have the webapp but also I launch it locally. The same is the result.
    The timestamp is in France time (GMT+1).
    Thanks ahead!
    Best regards,
    Steve
    2015-01-14 15:08:05: Service\BingAds::initService => SOAP-ERROR: Parsing Schema: can't import schema from 'https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V9/ReportingService.svc?xsd=xsd0'
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetDetailedBulkDownloadStatusRequest><ns1:RequestId>108277125</ns1:RequestId></ns1:GetDetailedBulkDownloadStatusRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v9">XXXXX</h:TrackingId></s:Header><s:Body><GetDetailedBulkDownloadStatusResponse
    xmlns="https://bingads.microsoft.com/CampaignManagement/v9"><Errors i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/><ForwardCompatibilityMap xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/><PercentComplete>100</PercentComplete><RequestStatus>Completed</RequestStatus><ResultFileUrl>https://download.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=XXX</ResultFileUrl></GetDetailedBulkDownloadStatusResponse></s:Body></s:Envelope>
    2015-01-15 05:41:39: Service\BingAds::getCampaigns => SoapFault: Could not connect to host
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    (empty response logged)
    2015-01-15 05:45:00: Service\BingAds::initService => SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl' : failed to load external entity "https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
    2015-01-15 11:58:46: Service\BingAds::getCampaigns =>
    ---------Soap Fault:--------------------------------------------
    SoapFault catched:
    Could not connect to host
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    (empty response logged)
    2015-01-15 11:59:50: Service\BingAds::initService =>
    ---------Soap Fault:--------------------------------------------
    SoapFault catched:
    SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl' : failed to load external entity "https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl"
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXXXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v9">XXXXX</h:TrackingId></s:Header><s:Body><GetCampaignsByAccountIdResponse
    xmlns="https://bingads.microsoft.com/CampaignManagement/v9"><Campaigns xmlns:i="http://www.w3.org/2001/XMLSchema-instance"></Campaign>........</Campaigns></GetCampaignsByAccountIdResponse></s:Body></s:Envelope>
    2015-01-15 12:05:55: Service\BingAds::getCampaigns =>
    ---------Soap Fault:--------------------------------------------
    SoapFault catched:
    Could not connect to host
    ---------Soap Request:--------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9"><SOAP-ENV:Header><ns1:CustomerAccountId>XXXXX</ns1:CustomerAccountId><ns1:CustomerId/><ns1:DeveloperToken>XXXXX</ns1:DeveloperToken><ns1:UserName/><ns1:Password/><ns1:AuthenticationToken>XXXXXX</ns1:AuthenticationToken></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>XXXXX</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ---------Response:------------------------------------------------
    (empty response logged)

    Hi,
    1. I am using the older version of the PHP library provided by Bing (updated on 1/20/2014), so that is doing the WSDL loadings. I initialize the proxy calling OpticoBingAdsClientProxy providing what it needs, and then do the requests.
    2. I have a cron that reads data from client's accounts. I make several calls, like get search query report, get keyword performance report, get keyword bulk data. As the script progressed the first 2 worked and the third gave error. Or in other cases the
    first request failed. The calls have quite some time in between them since I process data (sometimes even 160 seconds)
    3. I did not change the code ion terms of requests, since as I said I use the PHP library (same credentials, ...).
    As of today (2015-01-16 10:30 GMT + 2) running my script, still have the same issues.
    Thank you!
    Steve

  • XML parsing error: xml processing instruction not at start of external entity (error code 17)

    I created a form and recieve the filled in form by email from participants. It has always worked in the past. Recently when importing data into the master form (from filled in forms in xml files sent by applicants) I am getting this error message..."xml processing instruction not at start of external entity (error code 17), line 2, column 1...." pointing to the file of data (xml) I am trying to input.  If I pull up old data forms (from 2009) they work, but now I am getting this error.  I run Adobe Design Premium CS3 for Windows.  Can anyone tell me what to do to fix?

    I created a form and recieve the filled in form by email from participants. It has always worked in the past. Recently when importing data into the master form (from filled in forms in xml files sent by applicants) I am getting this error message..."xml processing instruction not at start of external entity (error code 17), line 2, column 1...." pointing to the file of data (xml) I am trying to input.  If I pull up old data forms (from 2009) they work, but now I am getting this error.  I run Adobe Design Premium CS3 for Windows.  Can anyone tell me what to do to fix?

  • "Error while parsing SOAP XML payload: no element found" received when invoking Web Service

    Running PB 12.1 Build 7000.  Using Easysoap.  Error ""Error while parsing SOAP XML payload: no element found" received when invoking Web Service".  This error does not appear to be coming from the application code.  Noticed that there were some erroneous characters showing up within the header portion of the XML ("&Quot;").  Not sure where these are coming from.  When I do a find within the PB code for ""&quot;" it gets located within two objects, whereas they both reference a "temp_xml_letter".  Not sure where or what temp_xml_letter resides???   The developer of this is no longer with us and my exposure to WSDL and Web Services is rather limited.  Need to get this resolved...please.
    This is the result of the search.  Notice the extraneous characters ("&quot;"):
    dar1main.pbl(d_as400_mq_xml)
    darlettr.pbl(d_email_xml)
    ---------- Search: Searching Target darwin for 'temp_xml'    (9:52:41 AM)
    ---------- 2 Matches Found On "temp_xml":
    dar1main.pbl(d_as400_mq_xml).d_as400_mq_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> number </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    darlettr.pbl(d_email_xml).d_email_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> imcnumber </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    ---------- Done 2 Matches Found On "temp_xml":
    ---------- Finished Searching Target darwin for 'temp_xml'    (9:52:41 AM)

    Maybe "extraneous" is an incorrect term.  Apparantly, based upon the writeup within Wiki, the parser I am using does not interpret the "&quot;"?  How do I find which parser is being utilized and how to control it?
    <<<
    If the document is read by an XML parser that does not or cannot read external entities, then only the five built-in XML character entities (see above) can safely be used, although other entities may be used if they are declared in the internal DTD subset.
    If the document is read by an XML parser that does read external entities, then the five built-in XML character entities can safely be used. The other 248 HTML character entities can be used as long as the XHTML DTD is accessible to the parser at the time the document is read. Other entities may also be used if they are declared in the internal DTD subset.
    >>>

  • External Entity Problem w/ ejb-jar.xml

    I cannot figure out nor find how to have the ejb-jar.xml refer to external entities
    so that it doesn't get overly large and unmanageable. Note: our "shared-ejb-jar.xml"
    gets converted into "ejb-jar.xml" inside of a deployed shared.jar file.
    The shared-ejb-jar.xml file contains:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'
    <!ENTITY SatelliteExt SYSTEM "satellite-ext.xml">
    ]>
    ........XML code.........
    &SatelliteExt;
    ........XML code.........
    The satellite-ext.xml file is in the same directory and contains the XML to describe
    a single <entity>...</entity>.
    I use ant to compile and receive this error:
    C:\jist\bin\build.xml:74: SAXException while parsing 'shared-ejb-jar.xml'. This
    probably indicates badly-formed XML. Details: Relative URI "satellite-ext.xml";
    can not be resolved without a document URI.
    Any help will be most appreciated.
    -- Guy

    Problem is resolved. Thanks for looking over this thread.
    Regards
    Karthik

  • SAXException while parsing 'ejb-jar.xml'.

    Hi
    My machine is behind a proxy. When I try to compile an EJB using ANT 1.3 I am getting the following Exception.
    D:\src\tools\ant\build.xml:1267: SAXException while parsing 'ejb-jar.xml'. This probably indicates badly-formed XML. Details: External entity not found: "http://java.sun.com/dtd/ejb-jar_1_1.dtd".
    --- Nested Exception ---
    java.net.SocketException: no further information (code=10071)
    at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
    I read inone of the news groups that I need to have weblogic.jar in the classpath.
    I am using webligic 6.1 and I have also set weblogic.jar in the classpath.
    Please help me
    Thanks
    Seshadri.

    It's http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd. Also, check your doctype -
    it publicid is correct (-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN),
    local DTD will be used.
    Seshadri <[email protected]> wrote:
    Hi
    My machine is behind a proxy. When I try to compile an EJB using ANT 1.3 I am getting the following Exception.
    D:\src\tools\ant\build.xml:1267: SAXException while parsing 'ejb-jar.xml'. This probably indicates badly-formed XML. Details: External entity not found: "http://java.sun.com/dtd/ejb-jar_1_1.dtd".
    --- Nested Exception ---
    java.net.SocketException: no further information (code=10071)
    at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
    I read inone of the news groups that I need to have weblogic.jar in the classpath.
    I am using webligic 6.1 and I have also set weblogic.jar in the classpath.
    Please help me
    Thanks
    Seshadri.--
    Dimitri

  • Ignoring the DOCTYPE element while parsing the xml

    I am using JAXB parser to read from and write into my xml file using java code. My xml file contains a DOCTYPE element pointing to a .dtd file which does not exist, due to which I get a FileNotFoundException when JAXB tries to read the xml file. Hence, after unmarshalling the xml file using jaxb, I use a SAXParser to get an XMLReader which removes this DOCTYPE element as given below -
    SAXParserFactory parserFactory = SAXParserFactory.newInstance();
    parserFactory.setValidating(false);
    XMLReader reader = parserFactory.newSAXParser().getXMLReader();
    reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
    After making the required changes to the xml file and marshalling it back, I then use an XMLWriter to add the DOCTYPE element back to the xml file as given in the code snippet below -
    SAXReader saxReader = new SAXReader();
    Document document = saxReader.read(_file);
    document.addDocType(rootElement, publicUri, systemUri);
    XMLWriter output = new XMLWriter(new FileWriter( _file ));
    output.write( document );
    output.close();
    Right now I am using both, the JAXB parser to read from and write into the xml file and SAXParser/SAXRader just to delete/add the DOCTYPE element. I want to avoid using two different parsers in my class and want to know if JAXB provides any mechanism to delete and then add this element while parsing the xml file.

    Standard answer for this FAQ: set an EntityResolver on your parser that sends an empty string instead of the DTD. The API docs have an example that you could modify to do that.

Maybe you are looking for

  • Moving some rolls to an external drive to save disk space

    I use my own folder structure with iPhoto 6. Each roll is in one folder on my powerbook hard-drive. As I am running out of space I would like to move the oldest rolls/folders to an external drive without losing my edits. Is there any utility that wil

  • Centos 4.4 compatibility with Oracle 10.1.0.3 on a Pentium

    Correct me if I am wrong, but I believe the Pentium 4 is an x86 architecture (32b or 64b I am not sure how to determine). But, I did a little research and below is what Oracle says from a minimum o/s standpoint for Oracle 10.1.x * Red Hat Enterprise

  • Errors occured during the Extraction.

    Hi Folks, I've transported Some of the HR data sources to the quality server,But when i check the data for 0HR_PT_2 DS in RSA3,I'm getting the message Errors occured during the Extraction.I checked for the details but nothing was there except Message

  • Printable area / Hardware margins of a Photosmart 6510 all-in-one

    I need to know the hardware margins (a.k.a printable area) of my 6510 printer. I am sure this information used to be in the technical specifications but I cannot find it there now. I specifically need to know the margins in both duplex and non duplex

  • "Invalid Serial Number" Acrobat Professional 8.0

    ""Invalid Serial Number: The serial number you entered is not valid." I installed Acrobat 8 on a previous computer and it worked fine.  Computer eventually was retired.  Then tried to install it on a new machine... in July.  Two series of customer su