UTFDataFormatException when parsing incoming XML

Hi,
I am constantly seeing this message bellow when upgrade OCEP from 11.1.1.2 to 11.1.1.3 when parsing the XML from inbound JMSAdapter . Anyone knows the problem and how to fix it?
patcherException: java.rmi.UnmarshalException: failed to unmarshal response; nested exception is:
java.io.UTFDataFormatException
weblogic.jms.common.JMSException: weblogic.messaging.dispatcher.DispatcherException: java.rmi.UnmarshalException: failed
to unmarshal response; nested exception is:
java.io.UTFDataFormatException
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:116)
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)
at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:894)
at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:647)
at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessag
eListenerContainer.java:405)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingM
essageListenerContainer.java:309)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMes
sageListenerContainer.java:261)
at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerCont
ainer.java:59)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(D
efaultMessageListenerContainer.java:983)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLo
op(DefaultMessageListenerContainer.java:974)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessa
geListenerContainer.java:876)
at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:39)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Thanks,
Brandon

I also got the same exception:
I am trying to access the JMS queue from CEP application and the JMS queue are configured and populated by the OBS server.
OSB server Version : 11g R1
Weblogic version : 10.3.3
CEP server Version : 11.1.1.3
Also I disable the DMS option in both CEP and OSB server.
In CEP Server:
I disable DMS option in ‘startwlevs.cmd’ file in CEP domain folder as shown below.
"%JAVA_HOME%\bin\java" %JVM_ARGS% %DGC% %DEBUG% -Doracle.dms.context=OFF
-Dwlevs.home="%USER_INSTALL_DIR%" -Dbea.home="%BEA_HOME%" -jar
"%USER_INSTALL_DIR%\bin\wlevs.jar" %1 %2 %3 %4 %5 %6
:finish
In OSB Server:
OSB11g WLS Path : C:\Oracle11g\user_projects\domains\base_domain\bin
File Name : startWebLogic.cmd
if "%WLS_REDIRECT_LOG%"=="" (
echo Starting WLS with line:
echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Doracle.dms.context=OFF -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
) else (
echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Doracle.dms.context=OFF -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS% >"%WLS_REDIRECT_LOG%" 2>&1
Please share your suggestion

Similar Messages

  • Unable to display tree view; Error when parsing an XML document (Premature end of file.)

    Hi folks,
    I am using a cascaded mapping in my OM. I have a graphical mapping followed by the Java mapping. It is a flat file to IDOC mapping. Everything works fine in Dev but when I transport the same objects to QA, the Operation mapping though it doesn't fail in ESR testing tool, gives the following message and there is no output generated for the same payload which is successfully tested in DEV. Please advise on what could be the possible reasons.
    Unable to display tree view; Error when parsing an XML document (Premature end of file.)

    kalyan,
    There seems to be an invalid xml payload which causes this error in ESR not generating the tree view. Please find the similar error screenshot and rectify the payload.
    Mutti

  • Error when parsing the XML document

    hi all.
    i have the next problem.
    the sender sistem send to XI an XML. some tags send a '#' caracter.
    Sender Service send:
    Torre B1 - B#Unimev
    when Im traying to test XML inbound, XI show the next error:
    Error when parsing the XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x14(:main:, row:1, col:992))
    XML:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ZDEBMAS6>
    -   <IDOC BEGIN="1">
    -      <EDI_DC40 SEGMENT="1">
             <TABNAM>EDI_DC40</TABNAM>
             <MANDT>300</MANDT>
             <DOCNUM>0000000000339708</DOCNUM>
             <DOCREL>640</DOCREL>
             <STATUS>30</STATUS>
             <DIRECT>1</DIRECT>
             <OUTMOD>2</OUTMOD>
           </EDI_DC40>
    -      <E1KNA1M SEGMENT="1">
              <MSGFN>009</MSGFN>
              <REGIO>07</REGIO>
              <STCD1>20147972750</STCD1>
              <FITYP>01</FITYP>
              <STCDT>80</STCDT>
              <STCD3>0</STCD3>
    -         <Z1KNA1M SEGMENT="1">
                 <MSGFN>009</MSGFN>
                  <KUNNR>0001000563</KUNNR>
                  <ZZSOCRCV>3100</ZZSOCRCV>
                  <ZZGBDAT>00000000</ZZGBDAT>
              <b> <ZZAD_STREET_CO>Torre B1 - B Unimev</ZZAD_STREET_CO></b>
                  <ZZAD_ROOMNUM_CO>PB</ZZAD_ROOMNUM_CO>
                  <ZZAD_FLOOR_CO>E</ZZAD_FLOOR_CO>
                  <ZZAD_PSTCD1_CO>M5521AAR</ZZAD_PSTCD1_CO>
                  <ZZAD_CITY1_CO>Mendoza</ZZAD_CITY1_CO>
                  <ZZAD_REGIO_CO>07</ZZAD_REGIO_CO>
               </Z1KNA1M>
               <Z1ADRCM SEGMENT="1">
                  <MSGFN>009</MSGFN>
                  <KUNNR>0001000563</KUNNR>
               <b><STREET>Torre B1 - B Unimev</STREET></b>
                  <FLOOR>PB</FLOOR>
                  <HOUSE_NUM2>E</HOUSE_NUM2>
                  <CITY1>Mendoza</CITY1>
                  <POST_CODE1>5521</POST_CODE1>
                  <COUNTRY>AR</COUNTRY>
                  <REGION>07</REGION>
                  <LANGU>S</LANGU>
              </Z1ADRCM>
          </E1KNA1M>
        </IDOC>
    </ZDEBMAS6>
    Message was edited by: Rodrigo Pertierra
    Message was edited by: Rodrigo Pertierra

    Hi Rodrigo,
    Do you use a specific "encoding" like UTF-8 or ISO-8859-1 in your Sender CC.
    Try changing the Transfer mode to Binary instead of Text.
    Also go through these links:-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Invalid char in XML from inbound IDoc
    Hope this provides a solution.
    Regards.
    Praveen

  • Java Http Listener to parse incoming XML

    Hey folks,
    I have a task where I need to create a secure http listener, which will then parse an incoming XML. Parsing an XML document seems pretty straight forward so no problems there.
    basically what I would like to know is how would I get started? Would I use a servlet? Im not familiar enough with the capabilities of Java to know what packages to use and whatnot. How would some of you go about designing such a system?
    Thanks in advance,
    Ken

    Yes, you can write a Servlet which does that.

  • JavaMapping in PI 7.1 Error:Unable to display tree view; Error when parsing

    hi,
    i get by testing in PI 7.1 (operation mapping) this ERROR:
    "Unable to display tree view; Error when parsing an XML document (Content is not allowed in prolog.)"
    this is my java-programm-code:
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import com.sap.aii.mapping.api.StreamTransformation;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    /*IMPORT statement imports the specified classes and its methods into the program */
    /Every Java mapping program must implement the interface StreamTransformation and its methods execute() and setParameter() and extend the class DefaultHandler./
    public class Mapping extends DefaultHandler implements StreamTransformation {
    Below is the declaration for all the variables we are going to use in the
    subsequent methods.
         private Map map;
         private OutputStream out;
         private boolean input1 = false;
         private boolean input2 = false;
         private int number1;
         private int number2;
         private int addvalue;
         private int mulvalue;
         private int subvalue;
         String lineEnd = System.getProperty("line.separator");
    setParamater() method is used to store the mapping object in the variable
    "map"
         public void setParameter(Map param) {
              map = param;
         public void execute(InputStream in, OutputStream out)
                   throws com.sap.aii.mapping.api.StreamTransformationException {
              DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              try {
                   SAXParser saxParser = factory.newSAXParser();
                   this.out = out;
                   saxParser.parse(in, handler);
              } catch (Throwable t) {
                   t.printStackTrace();
    As seen above execute() method has two parameters "in" of type
    InputStream and "out" of type OutputStream. First we get a new instance
    of SAXParserFactory and from this one we create a new Instance of
    SAXParser. To the Parse Method of SaxParser, we pass two parameters,
    inputstream "in" and the class variable "handler".
    Method "write" is a user defined method, which is used to write the
    string "s" to the outpurstream "out".
         private void write(String s) throws SAXException {
              try {
                   out.write(s.getBytes());
                   out.flush();
              } catch (IOException e) {
                   throw new SAXException("I/O error", e);
         public void startDocument() throws SAXException {
              write("");
              write(lineEnd);
              write("");
              write(lineEnd);
         public void endDocument() throws SAXException {
              write("");
              try {
                   out.flush();
              } catch (IOException e) {
                   throw new SAXException("I/O error", e);
         public void startElement(String namespaceURI, String sName, String qName,
                   Attributes attrs) throws SAXException {
              String eName = sName;
              if ("".equals(eName))
                   eName = qName;
              if (eName.equals("NUMBER1"))
                   input1 = true;
              if (eName.equals("NUMBER2"))
                   input2 = true;
         public void endElement(String namespaceURI, String sName, String qName)
                   throws SAXException {
              String eName = sName;
              if ("".equals(eName))
                   eName = qName;
              if (eName.equals("NUMBER1"))
                   input1 = false;
              if (eName.equals("NUMBER2"))
                   input2 = false;
         public void characters(char[] chars, int startIndex, int endIndex)
                   throws SAXException {
              String dataString = new String(chars, startIndex, endIndex).trim();
              if (input1) {
                   try {
                        number1 = Integer.parseInt(dataString);
                   } catch (NumberFormatException nfe) {
              if (input2) {
                   number2 = Integer.parseInt(dataString);
              if (input2 == true) {
                   addvalue = number1 + number2;
                   mulvalue = number1 * number2;
                   subvalue = number1 - number2;
                   write("" + addvalue + "");
                   write(lineEnd);
                   write("" + mulvalue + "");
                   write(lineEnd);
                   write("" + subvalue + "");
                   write(lineEnd);
    in developer studio 7.1 i dont get error.
    this happens by testing the mapping-programm in ESR.
    can somebody help me please?

    Make sure that the xml created out after the java mapping is a valid xml with only one root node.
    Regards,
    Prateek

  • Issue with parsing an xml document and namespaces

    I am having an issue when parsing an xml document that includes a namespace.
    Here is my xml:
    <?xml version="1.0" encoding="utf-8"?>
    <StatusFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" TxCnt="247" TxTotal="5756845.31" SourceId="3" xmlns="http://www.test.com/cig/payments/optimizer/status/2004/10/">
    <Tx PmtId="350031" Amt="16739" TxSts="09" CustSts="04" ChkNum="10605770" />
    <Tx PmtId="350990" Amt="31698.66" TxSts="09" CustSts="04" ChkNum="10605821" />
    <Tx PmtId="354992" Amt="201320.08" TxSts="09" CustSts="04" />
    <Tx PmtId="349277" Amt="6675.17" TxSts="09" CustSts="04" ChkNum="10605822" />
    <Tx PmtId="354979" Amt="66949.75" TxSts="09" CustSts="04" ChkNum="10605823" />
    <Tx PmtId="349341" Amt="63258.49" TxSts="09" CustSts="04" ChkNum="10605824" />
    <Tx PmtId="350025" Amt="5866.04" TxSts="09" CustSts="04" ChkNum="10605830" />
    <Tx PmtId="350024" Amt="15671.8" TxSts="09" CustSts="04" ChkNum="10605831" />
    <Tx PmtId="346822" Amt="9880.64" TxSts="09" CustSts="04" />
    <Tx PmtId="350023" Amt="1360" TxSts="09" CustSts="04" />
    <Tx PmtId="349802" Amt="131267" TxSts="09" CustSts="04" ChkNum="10605832" />
    <Tx PmtId="343573" Amt="14532.76" TxSts="09" CustSts="04" ChkNum="10605833" />
    <Tx PmtId="352675" Amt="4436" TxSts="09" CustSts="04" />
    <Tx PmtId="350022" Amt="1260" TxSts="09" CustSts="04" ChkNum="10605834" />
    <Tx PmtId="349714" Amt="80778" TxSts="09" CustSts="04" ChkNum="10605835" />
    <Tx PmtId="352676" Amt="10136" TxSts="09" CustSts="04" ChkNum="10605836" />
    <Tx PmtId="352679" Amt="25511.69" TxSts="09" CustSts="04" ChkNum="10605837" />
    <Tx PmtId="346502" Amt="12842.69" TxSts="10" CustSts="05" />
    <Tx PmtId="346503" Amt="4232.61" TxSts="09" CustSts="04" ChkNum="10605838" />
    </StatusFile>
    Here is my current code base:
    CREATE OR REPLACE PROCEDURE ParseXML(xml VARCHAR2) IS
    myParser xmlparser.parser := xmlparser.newparser;
    myDoc xmldom.DOMNode;
    myNodes xmldom.DOMNodeList;
    myElement xmldom.DOMElement;
    trec NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
    BEGIN
    xmlparser.parseBuffer(myParser,xml);
    myDoc := xmldom.makeNode(xmlparser.getDocument(myParser));
    myNodes := xslprocessor.selectNodes(myDoc,'//Tx');
    FOR i IN 0..xmldom.getLength(myNodes)-1 LOOP
    myElement := xmldom.makeElement(xmldom.item(buyOrders,i));
    trec.pmt_id := xmldom.getAttribute(curBuy,'PmtId');
    INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(PMT_ID) VALUES (trec.pmt_id);
    END LOOP;
    COMMIT;
    END ParseXML;
    If I remove the namespace, everything works just fine. The issue is that I cannot remove the namespace.
    Anyone have any suggestions on how I can get the xslprocessor.selectNodes to recognize my namespace?
    Thanks,
    Mark Moran

    Everyone,
    Well after lots of hours spent reading web pages and blogs, etc... I was able to re-write my procedure and get it to work with different calls.
    Here is my updated code.
    PROCEDURE PARSE_STATUS_XML(P_FILE_NAME IN VARCHAR2, P_XML_FILE IN CLOB) IS
    V_PARSER XMLPARSER.PARSER := XMLPARSER.NEWPARSER;
    V_DOCUMENT XMLDOM.DOMDOCUMENT;
    V_NODES XMLDOM.DOMNODELIST;
    V_ELEMENT XMLDOM.DOMELEMENT;
    V_TBL_RECORD NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
    BEGIN
    XMLPARSER.PARSECLOB(V_PARSER, P_XML_FILE);
    V_DOCUMENT := XMLPARSER.GETDOCUMENT(V_PARSER);
    V_ELEMENT := XMLDOM.GETDOCUMENTELEMENT(V_DOCUMENT);
    V_NODES := XMLDOM.GETELEMENTSBYTAGNAME(V_ELEMENT,'Tx','http://www.test.com/cig/payments/optimizer/status/2004/10/');
    FOR I IN 0..XMLDOM.GETLENGTH(V_NODES)-1 LOOP
    V_ELEMENT := XMLDOM.MAKEELEMENT(XMLDOM.ITEM(V_NODES,I));
    V_TBL_RECORD.PMT_ID := XMLDOM.GETATTRIBUTE(V_ELEMENT,'PmtId');
    V_TBL_RECORD.PMT_AMT := XMLDOM.GETATTRIBUTE(V_ELEMENT,'Amt');
    V_TBL_RECORD.E_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'TxSts');
    V_TBL_RECORD.E_REASON_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'StsRsn');
    V_TBL_RECORD.E_CUSTOMER_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'CustSts');
    V_TBL_RECORD.UPS_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'UpsTrcNum');
    V_TBL_RECORD.FED_REFERENCE_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FedRefNum');
    V_TBL_RECORD.FIDB_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FIDbtTrcNum');
    V_TBL_RECORD.CHECK_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'ChkNum');
    INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(
    CREATE_DATE,
    XML_FILE_NAME,     
    PMT_ID,
    PMT_AMT,
    E_STATUS_CODE,
    E_REASON_CODE,
    E_CUSTOMER_STATUS_CODE,
    UPS_TRACKING_NBR,
    FED_REFERENCE_NBR,
    FIDB_TRACKING_NBR,
    CHECK_NBR
         VALUES (
    SYSDATE,
    P_FILE_NAME,
    V_TBL_RECORD.PMT_ID,
    V_TBL_RECORD.PMT_AMT,
    V_TBL_RECORD.E_STATUS_CODE,
    V_TBL_RECORD.E_REASON_CODE,
    V_TBL_RECORD.E_CUSTOMER_STATUS_CODE,
    V_TBL_RECORD.UPS_TRACKING_NBR,
    V_TBL_RECORD.FED_REFERENCE_NBR,
    V_TBL_RECORD.FIDB_TRACKING_NBR,
    V_TBL_RECORD.CHECK_NBR
    END LOOP;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
         RAISE;
    END PARSE_STATUS_XML;
    Mark

  • Problem with parsing large xml files

    Hello All,
    I am parsing a large xml file of 20MB and I use DocumentBuilder.parse(File). This method works for small xml files with size less than 20MB but the application hangs and doesn't through any error message when parsing 20MB xml files. Please let me know what I have to do at this point ?
    Thanks & Regards,
    Kumar.

    Well... i can't agree.
    If you have such structure:
    <task>
      <task/>
      <task>
         <task>
            <task/>
         </task>
         <task/>
      </task>
    </task>
    ...you may always keep stack of tasks (at startElement push to top, and at endElement pop), so at every leaf of tree you will have all parents of that leaf.
    for such structure:
    <task id="1" parent="0"/>
    <task id="2" parent="1"/>
    <task id="3" parent="1"/>
    <task id="4" parent="2"/>
    <task id="5" parent="3"/>
    ...it will be much faster to go thro document by sax several times to build tree of tasks, than to load all document into memory...

  • "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.
    >>>

  • Persisting unexplained errors when parsing XML with schema validation

    Hi,
    I am trying to parse an XML file including XML schema validation. When I validate my .xml and .xsd in NetBeans 5.5 beta, I get not error. When I parse my XML in Java, I systematically get the following errors no matter what I try:
    i) Document root element "SQL_STATEMENT_LIST", must match DOCTYPE root "null".
    ii) Document is invalid: no grammar found.
    The code I use is the following:
    try {
    Document document;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true);
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File(PathToXml) );
    My XML is:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!-- Defining the SQL_STATEMENT_LIST element -->
    <xs:element name="SQL_STATEMENT_LIST" type= "SQL_STATEMENT_ITEM"/>
    <xs:complexType name="SQL_STATEMENT_ITEM">
    <xs:sequence>
    <xs:element name="SQL_SCRIPT" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <!-- Defining simple type ApplicationType with 3 possible values -->
    <xs:simpleType name="ApplicationType">
    <xs:restriction base="xs:string">
    <xs:enumeration value="DawningStreams"/>
    <xs:enumeration value="BaseResilience"/>
    <xs:enumeration value="BackBone"/>
    </xs:restriction>
    </xs:simpleType>
    <!-- Defining the SQL_SCRIPT element -->
    <xs:element name="SQL_SCRIPT" type= "SQL_STATEMENT"/>
    <xs:complexType name="SQL_STATEMENT">
    <xs:sequence>
    <xs:element name="NAME" type="xs:string"/>
    <xs:element name="TYPE" type="xs:string"/>
    <xs:element name="APPLICATION" type="ApplicationType"/>
    <xs:element name="SCRIPT" type="xs:string"/>
    <!-- Making sure the following element can occurs any number of times -->
    <xs:element name="FOLLOWS" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    and my XML is:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Document : SQLStatements.xml
    Created on : 1 juillet 2006, 15:08
    Author : J�r�me Verstrynge
    Description:
    Purpose of the document follows.
    -->
    <SQL_STATEMENT_LIST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.dawningstreams.com/XML-Schemas/SQLStatements.xsd">
    <SQL_SCRIPT>
    <NAME>CREATE_PEERS_TABLE</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE CACHED TABLE PEERS (
    PEER_ID           VARCHAR(20) NOT NULL,
    PEER_KNOWN_AS      VARCHAR(30) DEFAULT ' ' ,
    PRIMARY KEY ( PEER_ID )
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>CREATE_COMMUNITIES_TABLE</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE CACHED TABLE COMMUNITIES (
    COMMUNITY_ID VARCHAR(20) NOT NULL,
    COMMUNITY_KNOWN_AS VARCHAR(25) DEFAULT ' ',
    PRIMARY KEY ( COMMUNITY_ID )
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>CREATE_COMMUNITY_MEMBERS_TABLE</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE CACHED TABLE COMMUNITY_MEMBERS (
    COMMUNITY_ID VARCHAR(20) NOT NULL,
    PEER_ID VARCHAR(20) NOT NULL,
    PRIMARY KEY ( COMMUNITY_ID, PEER_ID )
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>DROP_PEER_TABLE</NAME>
    <TYPE>DELETION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    DROP TABLE PEERS IF EXISTS
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>DROP_COMMUNITIES_TABLE</NAME>
    <TYPE>DELETION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    DROP TABLE COMMUNITIES IF EXISTS
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>DROP_COMMUNITY_MEMBERS_TABLE</NAME>
    <TYPE>DELETION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    DROP TABLE COMMUNITY_MEMBERS IF EXISTS
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>CREATE_COMMUNITY_MEMBERS_VIEW</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE VIEW COMMUNITY_MEMBERS_VW AS
    SELECT P.PEER_ID, P.PEER_KNOWN_AS, C.COMMUNITY_ID, C.COMMUNITY_KNOWN_AS
    FROM PEERS P, COMMUNITIES C, COMMUNITY_MEMBERS CM
    WHERE P.PEER_ID = CM.PEER_ID
    AND C.COMMUNITY_ID = CM.COMMUNITY_ID
    </SCRIPT>
    <FOLLOWS>CREATE_PEERS_TABLE</FOLLOWS>
    <FOLLOWS>CREATE_COMMUNITIES_TABLE</FOLLOWS>
    </SQL_SCRIPT>
    </SQL_STATEMENT_LIST>
    Any ideas? Thanks !!!
    J�r�me Verstrynge

    Hi,
    I found the solution in the following post:
    Validate xml with DOM - no grammar found
    Sep 17, 2003 10:58 AM
    The solution is to add a line of code when parsing:
    try {
    Document document;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true);
    factory.setNamespaceAware(true);
    factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File(PathToXml) );
    The errors are gone !!!
    J�r�me Verstrynge

  • Or.xml.sax giving error when parsing character entity

    I am parsing an xml stream using SAX parser using org.xml.sax.*
    When any XML tag say <name>sumit & sumit</name> OR <name>sumit & sumit</name> is parsed it throws the error as :
    org.xml.sax.SAXParseException: XML-0210: (Fatal Error) Unexpected EOF.
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at org.xml.sax.SAXException.<init>(Compiled Code)
    at org.xml.sax.SAXParseException.<init>(Compiled Code)
    at oracle.xml.parser.v2.XMLParseException.<init>(Compiled Code)
    at oracle.xml.parser.v2.XMLError.flushErrors(Compiled Code)
    at oracle.xml.parser.v2.XMLError.error(Compiled Code)
    at oracle.xml.parser.v2.XMLError.error(Compiled Code)
    at oracle.xml.parser.v2.XMLReader.popXMLReader(Compiled Code)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(Compiled Code)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(Compiled Co
    de)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(Compiled Code)
    at oracle.xml.parser.v2.XMLParser.parse(Compiled Code)
    at com.fidelity.fbrs.general.process.GenericSAXHandler.parse(Compiled Co
    de)
    at com.fidelity.fbrs.general.process.ServiceRequest.processComplexXMLReq
    uest(Compiled Code)
    at com.fidelity.fbrs.general.process.ServiceRequest.processXMLRequest(Co
    mpiled Code)
    at com.fidelity.fbrs.general.process.ServiceRequest.service(Compiled Cod
    e)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at org.apache.jserv.JServConnection.processRequest(Compiled Code)
    at org.apache.jserv.JServConnection.run(Compiled Code)
    at java.lang.Thread.run(Compiled Code)
    Please let me the resolution,,,
    Thanks
    Sumit

    Correction:
    you need to escape the & character in your XML file by using &amp; instead of using & directly.

  • How to apply condition when parsing XML using XMLTable

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    XML Response to be processed by stored proc:
    <TFSResponse>
    <TFS>
              <referenceNumber>39760</referenceNumber>
              <reqId>39760</reqId>
              <fromAccount>
                   <id>1550796</id>
                   <number>0003210011</number>
              </fromAccount>
              <toAccount>
                   <id>1550769</id>
                   <number>3199109643</number>
              </toAccount>
              <createdBy>
                   <userId>627892</userId>
                   <userLoginId>AAAAAA</userLoginId>
                   <userTypeId>1</userTypeId>
              </createdBy>
              </TFS>
    </TFSResponse>
    Register schema script:
    DECLARE
    l_schema CLOB;
    BEGIN
    l_schema := '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb">
    <xs:element name="TFSResponse" type="TFSResponseWSResponseType" xdb:defaultTable="TEMP_RESULT" />
         <xs:complexType name="TFSResponseWSResponseType">
              <xs:sequence>
              <xs:element maxOccurs="unbounded" name="TFS" type="TFSSummaryWSTO"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="TFSSummaryWSTO">
              <xs:sequence>
                   <xs:element name="referenceNumber" type="xs:string"/>
                   <xs:element name="reqId" type="xs:long"/>
                   <xs:element name="fromAccount" type="tns:AccountSummaryWSTO" />
    <xs:element name="toAccount" type="tns:AccountSummaryWSTO"/>
                   <xs:element name="createdBy" type="tns:userWSTO"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="AccountSummaryWSTO">
              <xs:sequence>
                   <xs:element minOccurs="1" name="accountId" type="xs:long" />
                   <xs:element minOccurs="1" name="accountNumber" type="xs:string" />
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="userWSTO">
              <xs:sequence>
                   <xs:element name="userId" type="xs:long" />
                   <xs:element name="userLoginId" type="xs:string" />
                   <xs:element name="userTypeId" type="xs:short" />
              </xs:sequence>
         </xs:complexType>
    </xs:schema>';
    dbms_xmlSchema.registerSchema(schemaurl => 'TFSWebService_schema.xsd',
    schemadoc => l_schema,
    enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE);
    END;/
    Object Type:
    CREATE OR REPLACE TYPE DOC_ROWTYPE AS OBJECT
    REFERENCENUMBER VARCHAR2(255),
    REQID NUMBER(12),
    FROMACCOUNTID NUMBER(12),
    FROMACCOUNTNUMBER VARCHAR2(35),
    TOACCOUNTID NUMBER(12),
    TOACCOUNTNUMBER VARCHAR2(35),
    CREATEDBYUSERID NUMBER(12),
    CREATEDBYUSERLOGINID VARCHAR2(12)
    Collection Type:
    CREATE OR REPLACE TYPE DOC_TABLETYPE IS TABLE OF DOC_ROWTYPE;
    CREATE OR REPLACE PROCEDURE SP_TFS_REPORT (LoginId IN STRING,
    requestedByUser IN STRING,
    result_cursor OUT SYS_REFCURSOR)
    IS
    SYSTEM_USER VARCHAR2(12) := 'SYSTEM';
    l_http_request UTL_HTTP.req;
    l_http_response UTL_HTTP.resp;
    l_string_request VARCHAR2(1024);
    l_result_xml XMLTYPE;
    docExtTable_XML DOC_TABLETYPE := DOC_TABLETYPE();
    docExtRecord DOC_ROWTYPE;
    BEGIN
    l_string_request := .....(prepare web service request here)
    l_http_response := UTL_HTTP.get_response(l_http_request);
    resp_in_xml := XMLTYPE(l_clob_response);
    INSERT INTO TEMP_RESULT VALUES l_result_xml;
    SELECT DOC_ROWTYPE (t1.referenceNumber, t1.reqId, t2.accountId, t2.accountNumber, t3.accountId, t3.accountNumber,
                                                 t4.userLoginId, t4.userId)
    BULK COLLECT INTO docExtTable_XML
    FROM TEMP_RESULT ltr,
    XMLTABLE('/TFSResponse/TFS'
    PASSING ltr.object_value
    COLUMNS
    referenceNumber VARCHAR2(255 BYTE) PATH 'referenceNumber',
    reqId NUMBER(12)                PATH 'reqId',
    fromAccountXML XMLTYPE PATH 'fromAccount',
    toAccountXML XMLTYPE      PATH 'toAccount',
    createdByXML XMLTYPE      PATH 'createdBy'
    ) t1,
    XMLTABLE('/fromAccount'
    PASSING t1.fromAccountXML
    COLUMNS
    accountId NUMBER(12) PATH 'accountId',
    accountNumber VARCHAR2(35 BYTE) PATH 'accountNumber'
    ) t2,
    XMLTABLE('/toAccount'
    PASSING t1.toAccountXML
    COLUMNS
    accountId NUMBER(12) PATH 'accountId',
    accountNumber VARCHAR2(35 BYTE) PATH 'accountNumber'
    ) t3,
    XMLTABLE('/createdBy'
    PASSING t1.createdByXML
    COLUMNS
    userId NUMBER(12) PATH 'userId',
    userLoginId VARCHAR2(12 BYTE) PATH 'userLoginId' ----- This value should be set based on a condition*
    ) t4
    OPEN result_cursor FOR SELECT * FROM TABLE (DOC_TABLETYPE);
    COMMIT;
    END SP_TFS_REPORT
    The condition is like this
    IF (requestedByUser = true and createdByUserType = '2') then
    CREATEDBYUSERLOGINID := SYSTEM_USER;
    ELSE
         Take CREATEDBYUSERLOGINID from XML value 'userLoginId'
    where 'requestedByUser' is the input parameter to the stored procedure and 'createdByUserType' is the value from XML.
    'userTypeId' is not required to be set in collection.
    Now my question is how to put that condition when doing the XML parsing.
    Edited by: 991900 on Mar 19, 2013 9:54 AM

    Add a projection for "userTypeId" in T4, then use a CASE statement in the SELECT clause :
    SELECT  DOC_ROWTYPE (
            t1.referenceNumber, t1.reqId, t2.accountId, t2.accountNumber, t3.accountId, t3.accountNumber,
                                            t4.userId,
            CASE WHEN requestedByUser = 'true' AND t4.userTypeId = 2
                      THEN system_user
                 ELSE t4.userLoginId
            END
    BULK COLLECT INTO docExtTable_XML
        FROM TEMP_RESULT ltr,
        XMLTABLE('/TFSResponse/TFS'
                   PASSING ltr.object_value
                   COLUMNS
                       referenceNumber    VARCHAR2(255 BYTE)        PATH 'referenceNumber',
                       reqId              NUMBER(12)                   PATH 'reqId',                                       
                       fromAccountXML      XMLTYPE                  PATH 'fromAccount',                 
                       toAccountXML        XMLTYPE                     PATH 'toAccount',
                       createdByXML       XMLTYPE                     PATH 'createdBy'                                       
                    ) t1,
        XMLTABLE('/fromAccount'
                   PASSING t1.fromAccountXML
                   COLUMNS
                       accountId              NUMBER(12)    PATH 'accountId', 
                       accountNumber     VARCHAR2(35 BYTE)  PATH 'accountNumber'                                       
                   ) t2,
        XMLTABLE('/toAccount'
                   PASSING t1.toAccountXML
                   COLUMNS
                       accountId            NUMBER(12)    PATH 'accountId', 
                       accountNumber   VARCHAR2(35 BYTE)  PATH 'accountNumber'
                   ) t3,
        XMLTABLE('/createdBy'
                   PASSING t1.createdByXML
                   COLUMNS
                       userId           NUMBER(12)        PATH 'userId',
                       userLoginId      VARCHAR2(12 BYTE) PATH 'userLoginId',
                       userTypeId       NUMBER            PATH 'userTypeId'
                   ) t4
        ;

  • Xmlparser.parse fails when parsing xml with dtd

    Has anybody used successfully called xmlparser.parse in PL/SQL
    to parse an xml file with a dtd? When I try I get the following
    error:
    ERROR at line 1:
    ORA-20100: Error occurred while parsing: Invalid argument
    ORA-06512: at "SYS.XMLPARSER", line 22
    ORA-06512: at "SYS.XMLPARSER", line 69
    ORA-06512: at line 6
    When I remove the dtd reference from the xml file it works.
    (I posted this question yesterday but no responses, so I'm
    trying again...)
    Thanks - Dana

    Please see:
    http://forums.oracle.com/forums/message.jsp?id=617954
    for the solution. Thanks.

  • When parsing a large size xml file , OutOfMemorry exception(attach code)

    Dear all ,
    I met a OutOfMemorry exception when I parse a xml file (20M) in my application(I extract data in xml file for building my application data), but I found that it take long time(for 2 more minutes) even just searching the xml file , because my application is viewed by web page , so it's too bad for waiting.
    what I used is org.jdom.input.SAXBuilder(jdom1.0beta8-dev) , and my xml file structure is like :
    <errors>
    <item1>content</item1>
    <item2>content</item2>
    </errors>
    and this is my source code of parsing xml file :
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import org.jdom.*;
    import org.jdom.input.*;
    import org.jdom.output.*;
    public class XMLProperties {
        private File file;
        private Document doc;
        private Map propertyCache = new HashMap();
        public XMLProperties(String filename) {
                SAXBuilder builder = new SAXBuilder();
                // Strip formatting
                DataUnformatFilter format = new DataUnformatFilter();
                builder.setXMLFilter(format);
                long time_start = System.currentTimeMillis();
                Runtime run = Runtime.getRuntime();
                doc = builder.build(new File(filename));
                System.out.println("Build doc memory ="+(run.totalMemory()-
                         run.freeMemory())/1024+"K");
                System.out.println("Build doc used time :"+(
                         System.currentTimeMillis()-time_start)/1000+" s");
            catch (Exception e) {
                System.err.println("Error creating XML parser in "
                    + "PropertyManager.java");
                e.printStackTrace();
         public String [] getChildrenProperties(String parent) {
            // Search for this property by traversing down the XML heirarchy.
            Element element = doc.getRootElement();
            element = element.getChild(parent);
            if (element == null) {
                // This node doesn't match this part of the property name which
                // indicates this property doesn't exist so return empty array.
                return new String [] { };
            // We found matching property, return names of children.
            List children = element.getChildren();
            int childCount = children.size();
            String [] childrenNames = new String[childCount];
            for (int i=0; i<childCount; i++) {
                childrenNames[i] = ((Element)children.get(i)).getName();
            return childrenNames;
        }the test main class:
    import java.util.Map;
    import java.util.HashMap;
    import org.jdom.*;
    import org.jdom.input.*;
    public class MyTest {
      public static void main(String[] args) {
        long time_start = System.currentTimeMillis();
        Runtime run = Runtime.getRuntime();
        Map childs = new HashMap();
        System.out.println("Used memory before="+(run.totalMemory()-run.freeMemory())/1024 + "K");
        XMLProperties parser = new XMLProperties("D:\\projects\\edr\\jsp\\status-data\\edr-status-2003-09-01.xml");
        String[] child = parser.getChildrenProperties("errors");
        for(int i=0;i<child.length;i++) {
    //      childs.put(new Integer(i), child);
    if(i%1000 == 0) {
    System.out.println("Used memory while="+(run.totalMemory()-run.freeMemory()/1024+"K"));
    System.out.println("child.length="+child.length);
    System.out.println("Used memory after="+(run.totalMemory()-run.freeMemory())/1024+"K");
    System.out.println("Time used: "+(System.currentTimeMillis()-time_start)/1000+"s");
    The result is : Used memory before=139K
    Used memory while=56963K
    Used memory after=51442K
    child.length=27343
    Time used: 146s
    is that some way to solve this problem ?
    Thanks for your help

    I met a OutOfMemorry exception when I parse a xml
    l file (20M) in my application(I extract data in xml
    file for building my application data)...Rule of thumb for parsing XML: the memory you need is about 10 times the size of the XML file. So in your case you need 200 MB of free memory.
    , but I found
    that it take long time(for 2 more minutes) even just
    searching the xml file , because my application is
    viewed by web page...Then you need to redesign your application. Parsing 20 megabytes of XML for every request is -- as you can see -- impractical. Sorry I can't suggest how, since I have no idea what your application is.

  • Slow processing when Parsing  XML files

    Hi
    I have written a utility in Java (using JAXP) which parses an .xml file. This xml file
    contains references to n number of other xml files. From here I direct the parser to each of these individual xml files where it searches for elements with a particular tag name, lets say 'node'. As in,
    <node name= "Parent A">
    <entry key="type" value="car"/>....
    </node>
    <node name= "Parent B">
    <entry key="type" value="Truck"/>
    </node>
    I am collecting all the 'nodes' from these n xml files and then finally building a single xml file which will contain only the 'node' and its attribute 'name' value. As in,
    <node name="Parent A"/>
    <node name="Parent B"/>
    In most cases n is a number greater than 100. Each of these n xml file have LOC exceeding 2 to 3000.
    NOW the issue is, the xml parser takes more than an hr to go through just 10 - 15 xml files , collects the 'node', and building a new DOM object which I finally get published using Xml Transformer.
    In effect , it beats the whole purpose of writing this utility as no programmer will stick around for an hr to to watch it happen/finish.
    Apart from maybe further fine tuning my logic, which I've almost exhusted, is there any 'faster' way of doing the whole thing.
    Please reply. Any comment would be greatly appreciated.
    I am using JAXP 1.3 specs to parse and build the DOM.

    DOM is slow.
    Do it yourself using a simple SAX-parser. For all startElement - check if it is a "node", and then write your output!
    Xerces is faster than the built in Crimoson SAX-parser in Java.
    Parsing with Xerces a 2GHz machine takes manages about 5-6 MB/s of XML files.
    Or use STX with Joost - although it's not THAT much faster
    http://www.xml.com/pub/a/2003/02/26/stx.html
    http://joost.sourceforge.net/
    Gil

  • Too many files open when parsing xml

    HI,
    I have an application which needs to parse about 13 XML files multiple times.After parsing the XML and creating a DOM I put in values to create an XML message which is then put onto a message queue.I am getting a 'Too many files open' problem.I have run the loop a maximum of 105 times after which i get the problem.However I will need to do this atleast more than 10000 times.Can someone suggest a solution to read the XML, create a DOM and populate the DOM without encountering the above mentioned problem.If I just parse the XML and store the 13 DOMs in a HashMap and use the same, the text values from the previous call get appended resulting in an invalid XML.To overcome this we parse the XML each time a message is to be sent.We also tried increasing the system memory as suggested at some sites but the solution was of no help.
    Thanks & Regards

    Don't know what this has to do with Web Start but you should make sure that, after parsing a file, the corresponding InputStream is properly closed.

Maybe you are looking for

  • To create detailed level report which is preffered  cube or ods

    can any 1 plz justify for a new requirement ,detailed level reporting which is best and why.

  • Embedding skype into a webpage

    HI Not sure if this is the right board. I am wondering if it is possible to get the skype application to open within a web page I have created a button for a site that launches the skype app separately which works fine, but I want to be able to have

  • Time Capsule isn't doing right

    I have backed up hundreds of GBs since I bought it last march. My average daily back ups is around at least 500mb per day because of updated digital photos. Out of blue, from the time machine window back up meter says shy over 200 GB. It is definitel

  • Fonts and commercial use

    Not sure why it is so difficult to get a clear-cut answer on whether the fonts that come with a mac purchase are free for commerical use. Anyone have a link to a sure-fire answer? Thanks in advance.

  • I don't have intel based on my mac

    I need to upgrade my Mac OS X  version 10.5.8 to snow  leopard iOS there any help there ?please