Issue with XML parsing

Hey guys,
Issue goes like this : I've got an XML which has a name space reference as shown below :
<root>
     <node1>
        <*ns*:node2>test_data</ns:node2>
    </node1>
</root>
-- I'm using the functions in the XSL processor package to access the data under node2 :
  l_db_n :=
         DBMS_XSLPROCESSOR.selectSingleNode(l_n,
                                        'node1'                                       
         DBMS_XSLPROCESSOR.valueof (l_db_n,
                                    'node2/text()' ,
                                   l_node_value , 'xmlns:ns2="http://some-url.com"');the code fails if I include the namespace reference as shown above, can someone tell me where I'm going wrong ?
Or if this is not the way to specify a namespace reference, pls let me know how to do it, help much appreciated.
Thanks
Edited by: user11382544 on Dec 17, 2009 11:47 PM

Here's an example of extracting data from XML that has namespaces in it...
SQL> ed
Wrote file afiedt.buf
  1  WITH t as (select XMLTYPE('
  2  <RECSET xmlns:aa="http://www.w3.org">
  3    <aa:REC>
  4      <aa:COUNTRY>1</aa:COUNTRY>
  5      <aa:POINT>1800</aa:POINT>
  6      <aa:USER_INFO>
  7        <aa:USER_ID>1</aa:USER_ID>
  8        <aa:TARGET>28</aa:TARGET>
  9        <aa:STATE>6</aa:STATE>
10        <aa:TASK>12</aa:TASK>
11      </aa:USER_INFO>
12      <aa:USER_INFO>
13        <aa:USER_ID>5</aa:USER_ID>
14        <aa:TARGET>19</aa:TARGET>
15        <aa:STATE>1</aa:STATE>
16        <aa:TASK>90</aa:TASK>
17      </aa:USER_INFO>
18    </aa:REC>
19    <aa:REC>
20      <aa:COUNTRY>2</aa:COUNTRY>
21      <aa:POINT>2400</aa:POINT>
22      <aa:USER_INFO>
23        <aa:USER_ID>3</aa:USER_ID>
24        <aa:TARGET>14</aa:TARGET>
25        <aa:STATE>7</aa:STATE>
26        <aa:TASK>5</aa:TASK>
27      </aa:USER_INFO>
28    </aa:REC>
29  </RECSET>') as xml from dual)
30  -- END OF TEST DATA
31  select x.country, x.point, y.user_id, y.target, y.state, y.task
32  from t
33      ,XMLTABLE(XMLNAMESPACES('http://www.w3.org' as "aa"),
34                '/RECSET/aa:REC'
35                PASSING t.xml
36                COLUMNS country NUMBER PATH '/aa:REC/aa:COUNTRY'
37                       ,point   NUMBER PATH '/aa:REC/aa:POINT'
38                       ,user_info XMLTYPE PATH '/aa:REC/*'
39               ) x
40      ,XMLTABLE(XMLNAMESPACES('http://www.w3.org' as "aa"),
41                '/aa:USER_INFO'
42                PASSING x.user_info
43                COLUMNS user_id NUMBER PATH '/aa:USER_INFO/aa:USER_ID'
44                       ,target  NUMBER PATH '/aa:USER_INFO/aa:TARGET'
45                       ,state   NUMBER PATH '/aa:USER_INFO/aa:STATE'
46                       ,task    NUMBER PATH '/aa:USER_INFO/aa:TASK'
47*              ) y
SQL> /
   COUNTRY      POINT    USER_ID     TARGET      STATE       TASK
         1       1800          1         28          6         12
         1       1800          5         19          1         90
         2       2400          3         14          7          5
SQL>

Similar Messages

  • Issue with XML encoding

    Hi,
    I am querying an SAP instance for data, and I am getting back the data in an XML document...to which I need apply XSL transformation.
    The instance is an German one... so I am getting a few strange characters because of which, the parser is uanble to apply the transformation.
    I wrote a small java program to get more info on this particular character causing the problem, it turns out to be an ISOControl character. The properties (got by using the Character class API) are as below.
    1. Character 1:
    The getDirectionality is:0
    The getNumericValue is:21
    The getType is:2
    The isDefined is:true
    The isISOControl is:false
    The isMirrored is:false
    The isSpaceChar is:false
    The isUnicodeIdentifierPart is:true
    The isUnicodeIdentifierStart is:true
    The isWhitespace is:false
    2. character 2:
    The getDirectionality is:9
    The getNumericValue is:-1
    The getType is:15
    The isDefined is:true
    The isISOControl is:true
    The isMirrored is:false
    The isSpaceChar is:false
    The isUnicodeIdentifierPart is:true
    The isUnicodeIdentifierStart is:false
    The isWhitespace is:false
    These characters appear to be white space in normal text editors...
    This is how I am applying the transformation
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer =
    tFactory.newTransformer(
    new javax.xml.transform.stream.StreamSource
    (XSLURI)
    StringReader sr = new StringReader(xmlToApply);
    StringWriter sw = new StringWriter();
    transformer.transform(
    new javax.xml.transform.stream.StreamSource(sr),
    new javax.xml.transform.stream.StreamResult(sw)
    return sw.toString();
    I have tried to use "UTF-8", "ISO-8859-1" and other encodings, but in vain. Appreciate any pointers on this...

    Also the postings are from 2 different perspectives... this is to address the issue that I am facing with XML parsing and how to eliminate that using XML apis...
    My other posting about a possible work around (encoding) for the problem creating string...

  • Issue with XML PDF and AdobeDesigner!

    Hello!<br />I have a PDF Document!<br />With Acrobat Proffesional Reader i can File -> Export Form Data (Hope this is right in english)<br /><br />A new XML File will be generated<br /><br />The conten of the File<br /><br /><?xml version="1.0" encoding="UTF-8" ?> <br />- <ichicsr lang=""><br />- <ichicsrmessageheader =""><br /><messagetype ="" /> <br /><mailrcpt ="">[email protected]</mailrcpt> <br /><mailbody ="">Test</mailbody> <br /><br />To this Point all works fine...<br /><br />but when i Load up the PDF File in AdobeDesigner, and save it up. (I do no changes at this Point, only Save the file.) and close<br /><br />And then i export second time the xml data with Acrobat Proffesional Reader <br /><br />the conten looks like this:<br /><br /><?xml version="1.0" encoding="UTF-8" ?> <br />- <ichicsr lang=""><br />- <ichicsrmessageheader lang=""><br /><messagetype lang="" /> <br /><mailrcpt lang="">[email protected]</mailrcpt> <br /><mailbody lang="">Test</mailbody> <br /><br />everywhere is written lang?!?!?!?!<br />WHY??? How can I eliminate this effect?!<br /><br />HELP and sorry for my bad english!

    Your XML processor should just ignore the tags it doesn't understand -
    no problem.
    It sounds as if you are trying to create a very simplified XML parser
    that looks for text patterns. I advise against this. There are many
    tools designed to parse XML and which will take care of the special
    issues. A simple text approach will collapse the first time someone
    types an ampersand "&" in their text...
    Aandi Inston

  • J2SE adapter PI 7.1 issue with XML to flat conversion and namespace length

    Dear reader,
    We are facing an issue with J2SE Adapter PI7.1 for a number of flows.
    The flow requirements:
    [1] Namespace length for interfaces is up to 100 characters
    [2] The XML message must be converted to Flat on the adapter channel
    Our PI system is at patch level 7 and we implement J2SE adapter on patch level 7 as well.
    We found that the J2SE adapter on patch level 7 does not support long namespaces [1] (as it should since this is an PI 7.1 j2SE adapter) but no issues where found with the XML to flat conversion [2].
    Experimenting with J2SE adapter on patch level 6 we found the long namespaces [1] are supported however an issue is found with the XML to flat conversion [2] as stated in SAP note 1335527.
    An SAP Customer Message is raised on this issue however your input is highly appricated!
    With Kind Regards,
    Harald Kastelijn
    Edited by: Harald Kastelijn on Mar 6, 2010 9:17 AM
    Edited by: Harald Kastelijn on Mar 6, 2010 9:19 AM

    We found that the J2SE adapter on patch level 7 does not support long namespaces [1] (as it should since this is an PI 7.1
    j2SE adapter) but no issues where found with the XML to flat conversion [2]
    I think the restriction of namespace length still remains in design time (IR).....the same however has been extended in configuration and runtime...this SAP note has some information: https://service.sap.com/sap/support/notes/870809

  • 10g Reports issue with XML Data Source

    Hi,
    Has anybody ever encountered an issue with Oracle 10g report using an XML as the data source? What happens is, some of the values in the XML are printed to the wrong column.
    One of the elements in our XML file is a complex type with 10 elements under it. The first 5 are picked up properly, but the last 6 are not. Elements #6 to #9 has a minimum occurence of 0. What happens is when element #6 is present, but #7 is, the value for element #7 is passed on to element #6.
    The XSD and XSL files are both valid since the reports were working when we were still using 9i. There is no hidden logic in the report which might cause this issue to come up, i.e., the report just picks up the values from the XML and prints it to the appropriate columns.
    Any help will be greatly appreciated.

    XSD used
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
            <!-- trade instructions detail & trailer -->
            <xs:element name="TradeDetail">
                    <xs:complexType>
                            <xs:sequence>
                                    <xs:element ref="TradeType"/>
                                    <xs:element ref="TradeID"/>
                                    <xs:element ref="TradeDate"/>
                                    <xs:element ref="FundID"/>
                                    <xs:element ref="FundName"/>
                                    <xs:element ref="DollarValue" minOccurs="0"/>
                                    <xs:element ref="UnitValue" minOccurs="0"/>
                                    <xs:element ref="PercentageValue" minOccurs="0"/>
                                    <xs:element ref="OriginalTradeID" minOccurs="0"/>
                                    <xs:element ref="CancellationFlag"/>
                            </xs:sequence>
                    </xs:complexType>
            </xs:element>
            <xs:element name="Instruction">
                    <xs:complexType>
                            <xs:sequence minOccurs="0">
                                    <xs:element ref="TradeDetail" maxOccurs="unbounded"/>
                            </xs:sequence>
                    </xs:complexType>
            </xs:element>
            <!-- overall trade instruction message -->
            <xs:element name="InterchangeHeader">
                    <xs:complexType>
                            <xs:sequence>
                                    <xs:element ref="Instruction"/>
                            </xs:sequence>
                    </xs:complexType>
            </xs:element>
            <!-- definition of simple elements -->
            <xs:element name="FundID" type="xs:string"/>
            <xs:element name="TradeType" type="xs:string"/>
            <xs:element name="TradeID" type="xs:string"/>
            <xs:element name="TradeDate" type="xs:string"/>
            <xs:element name="FundName" type="xs:string"/>
            <xs:element name="DollarValue" type="xs:decimal"/>
            <xs:element name="UnitValue" type="xs:decimal"/>
            <xs:element name="PercentageValue" type="xs:decimal"/>
            <xs:element name="OriginalTradeID" type="xs:string"/>
            <xs:element name="CancellationFlag" type="xs:string"/>
    </xs:schema>
    XML used
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <InterchangeHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="TradeInstruction.xsd">
       <Instruction>
          <TradeDetail>
             <TradeType>Purchase</TradeType>
             <TradeID>M000038290</TradeID>
             <TradeDate>20061201</TradeDate>
             <FundID>ARO0011AU</FundID>
             <FundName>ABN Fund</FundName>
             <DollarValue>2111.53</DollarValue>
             <CancellationFlag>N</CancellationFlag>
          </TradeDetail>
          <TradeDetail>
             <TradeType>Redemption</TradeType>
             <TradeID>M000038292</TradeID>
             <TradeDate>20061201</TradeDate>
             <FundID>ARO0011AU</FundID>
             <FundName>AMRO Equity Fund</FundName>
             <UnitValue>104881.270200</UnitValue>
             <CancellationFlag>N</CancellationFlag>
          </TradeDetail>
          <TradeDetail>
             <TradeType>ISPurchase</TradeType>
             <TradeID>M000038312</TradeID>
             <TradeDate>20061201</TradeDate>
             <FundID>MLC0011AU</FundID>
             <FundName>Cash Fund</FundName>
             <OriginalTradeID>M000038311</OriginalTradeID>
             <CancellationFlag>N</CancellationFlag>
          </TradeDetail>
       </Instruction>
    </InterchangeHeader>
    XSLT used
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
            <xsl:template match="/">
                    <InterchangeHeader>
                            <xsl:for-each select="InterchangeHeader/Instruction/TradeDetail">
                            <xsl:sort select="FundName"/>
                            <xsl:sort select="TradeDate"/>
                                    <TradeDetail>
                                            <TradeType><xsl:value-of select="TradeType"/></TradeType>
                                            <TradeID><xsl:value-of select="TradeID"/></TradeID>
                                            <TradeDate><xsl:value-of select="TradeDate"/></TradeDate>
                                            <FundID><xsl:value-of select="FundID"/></FundID>
                                            <FundName><xsl:value-of select="FundName"/></FundName>
                                            <DollarValue><xsl:value-of select="DollarValue"/></DollarValue>
                                            <UnitValue><xsl:value-of select="UnitValue"/></UnitValue>
                                            <PercentageValue><xsl:value-of select="PercentageValue"/></PercentageValue>
                                            <OriginalTradeID><xsl:value-of select="OriginalTradeID"/></OriginalTradeID>
                                            <CancellationFlag><xsl:value-of select="CancellationFlag"/></CancellationFlag>
                                    </TradeDetail>
                            </xsl:for-each>
                    </InterchangeHeader>
            </xsl:template>
    </xsl:stylesheet>

  • Issue with XML bursting program

    Hi All,
    We have a Oracle concurrent program which generates PDF output using XML data and RTF template. This output is sent as attachment to a designated user using XML bursting.
    The issue that we are facing is, the mail is sent to the recipients correctly when the program is run from my login. But when the same is run from anyone else’s login, the bursting program fails.
    Suppose the receiver’s email id is [email protected], the error faced is
    [oracle.apps.xdo.batch.DeliveryHelper][EXCEPTION] javax.mail.internet.AddressException: Illegal character in domain in string ``[email protected]@xyz.com''
    On examining the XML bursting program log file for successful and error runs, I could see the below property in the log file-
    For successful run: [SMTP_TO_RECIPIENTS:String] [[email protected]]
    Whereas for unsuccessful run: [SMTP_TO_RECIPIENTS:String] [[email protected]@xyz.com]
    Any pointers in this regard are highly appreciated.
    Regards,
    Kiranmayi.

    Thanks for your quick response.
    I believe the HP printer is an old one and I did have a couple of issues with it while using XML Publisher.However we've overcome those issues.
    We have installed xpdf and have been using the pdf2ps utility.We have PASTA set up and printing works fine when Bursting is not used.
    Is there some change I have to make to the configuration file/Bursting Control file to be able to use this pdf2ps utility to print to this Printer?
    Nevertheless I will also try using ipp on one of our newer printers...
    Thanks,
    Lavina

  • Issue with XML report printing on R12 instance

    Hi,
    I'm facing issue with printing xml reports on R12 instance and followed the note (How To Print XML Publisher PDF Reports Via The Concurrent Manager:metalink id:338990.1) and configured the pasta printer,still printer output is showing the junk charcters.
    Please let me know how to resolve the issue?.

    Hi Hussien,
    We are on 12.1.1 / 11g with AL32UTF8 character set, we have custom reports developed in BI publisher and some some migrated reported from earlier version.
    Both BI publisher based custom like PO/Invoice/Cheque Print & seeded reports like "Active users/responsibilites" are being generated successfuly in pdf output. when copied to desktop and printed it prints properly. But when trying to direct output to printer from concurrent request it is printng junk.
    I checked pasta configuration, all required ghostscripts tools are on the AIX box, am I missing anything in R12?
    Regards

  • Can't use UTF-16 encoding with XML Parser for Java v2.

    This is my XML Document:
    <?xml version="1.0" encoding="UTF-16" ?>
    <Content>
    <Title>Documento de Prueba de gestin de contenidos.</Title>
    <Creator>Roberto P     rez Lita</Creator>
    </Content>
    This is the way in which i parse de document:
    DOMParser parser=new DOMParser();
    parser.setPreserveWhitespace(true);
    parser.setErrorStream(System.err);
    parser.setValidationMode(false);
    parser.showWarnings(true);
    parser.parse(
    new FileInputStream(new File("PruebaA3Ingles.xml")));
    I've got this error:
    XML-0231 : (Error) Encoding 'UTF-16' is not currently supported.
    I am using the XML Parser for Java v2_0_2_5 and I am a little
    confused because the documentation says that the UTF-16 encoding
    is supported in this version of the Parser.
    Does anybody know how can I parse documents containing spanish
    accents?
    Thanks in advance.
    Roberto P     rez.
    null

    Oracle just uploaded a new release of V2 Parser. It should
    support UTF-16.
    Yet, other utilities still have some problems with UTF-16
    encoding. Seems we just
    have to wait this one out.
    BTW, I'm trying to use Japanese. We, also, have some problems
    with JServer.
    Roberto P     rez (guest) wrote:
    : This is my XML Document:
    : <?xml version="1.0" encoding="UTF-16" ?>
    : <Content>
    : <Title>Documento de Prueba de gestin de contenidos.</Title>
    : <Creator>Roberto P     rez Lita</Creator>
    : </Content>
    : This is the way in which i parse de document:
    : DOMParser parser=new DOMParser();
    : parser.setPreserveWhitespace(true);
    : parser.setErrorStream(System.err);
    : parser.setValidationMode(false);
    : parser.showWarnings(true);
    : parser.parse(
    : new FileInputStream(new File("PruebaA3Ingles.xml")));
    : I've got this error:
    : XML-0231 : (Error) Encoding 'UTF-16' is not currently supported.
    : I am using the XML Parser for Java v2_0_2_5 and I am a little
    : confused because the documentation says that the UTF-16
    encoding
    : is supported in this version of the Parser.
    : Does anybody know how can I parse documents containing spanish
    : accents?
    : Thanks in advance.
    : Roberto P     rez.
    null

  • Still problems serializing xml-docs with xml-parser for java v2.0.2.7

    Hi !
    I'm using the Oracle XML Parser 2.0.2.7.0 and get some problems when serializing the XMLDocument.
    In one class (DOMOut) I parse a xml-file with the oracle.xml.parser.v2.DOMParser, then obtain the XMLDocument and write it to System.out
    In another class (DOMIn) I fetch the XMLDocument from System.in, search for a given Element and print it's TextValue (if existing) to System.out
    That is where the error occurs.
    I get the XMLDocument from System.in but the returning NodeList from doc.getElementsByTagName() is empty. [nl.getLength()==0] even if it shouldn't be.
    Look at this code and output:
    [DOMOut]
    DOMParser parser = new DOMParser();
    parser.parse(url);
    XMLDocument doc = (XMLDocument)parser.getDocument();
    ObjectOutputStream out = new ObjectOutputStream(System.out);
    out.writeObject(doc); out.flush();
    [DOMIn]
    ObjectInputStream in = new ObjectInputStream(System.in);
    XMLDocument doc = (XMLDocument)in.readObject();
    doc.print(System.out);
    NodeList nl = doc.getElementsByTagName("Name");
    System.out.println("Length of NodeList: "+nl.getLength());
    if (nl.getLength()==0)
    System.out.println(argv[0] + ": not in this document!");
    else {
    XMLNode node = (XMLNode) nl.item(nl.getLength()-1);
    System.out.println(node.getNodeName() + ": " + (node.getFirstChild()).getNodeValue());
    This is the relevant code.
    I javac both classes and then do this:
    java DOMOut xmltestfile.xml > xx
    java DOMIn Name < xx
    And get this as output:
    <?xml version = '1.0'?>
    <!DOCTYPE course [
    <!ELEMENT course (Name,Dept,Instructor,Student)>
    <!ELEMENT Name ((#PCDATA)*)*>
    <!ELEMENT Dept ((#PCDATA)*)*>
    <!ELEMENT Instructor (Name)>
    <!ELEMENT Student (Name)*>
    ]>
    <course>
    <Name>Calculus</Name>
    <Dept>Math</Dept>
    <Instructor>
    <Name>Jim Green</Name>
    </Instructor>
    <Student>
    <Name>Jack</Name>
    <Name>Mary</Name>
    <Name>Paul</Name>
    </Student>
    </course>
    Length of NodeList: 0
    Name: not in this document!
    Has anyone an idea?
    If I do all this stuff without serializing it works.
    If I do not search for argv[0], but the string "Name" it fails.
    If I do search for "*" it works fine!
    I'm very confused could anybody please help me a bit??
    Stefan.
    [[email protected]]

    The link has been fixed. You will go to the v2 download page
    now. Sorry for the inconvience.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Renilton Oliveira (guest) wrote:
    : I didn't find the file for version 2.0.0.0 as well.
    : Renilton
    : Andrei Filimonov (guest) wrote:
    : : I tried to download XML Parser for Java v2 it seems that
    only
    : v
    : : 1.0.1.4 is available. Could you please give an exact URL for
    : v2
    : : download?
    : : Andrei Filimonov
    : : Oracle XML Team wrote:
    : : : The Oracle XML v2 parser is now available for download
    here
    : as
    : : : an early beta release and is written in Java. It features
    : an
    : : : improved architecture over the Oracle XML v1 parser and
    has
    : : : shown better performance on small to large XML documents.
    : It
    : : : will also be able to format the XML document according to
    a
    : : : stylesheet, having integrated an XSLT processor.
    : : : Version 2 of the XML Parser for Java, besides
    incorporating
    : an
    : : : XSLT processor, has been re-architected from version 1.
    This
    : : has
    : : : resulted in a number of changes to the class names
    : especially
    : : : those that support Namespaces. See v2changes.txt and
    : the .diff
    : : : difference files in the sample directory.
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    null

  • Error with XML Parsing

    Hello,
    Getting the following error :
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00217: invalid character 0 (U+0000)
    Error at line 1-31011
    I have an xml data in a clob and looks like one of the tag has a invalid character due to which the parsing fails. Anyway to get around this issue?
    example
    DECLARE
    l_clob CLOB;
    l_xml XMLTYPE;
    BEGIN
    l_clob := ' <tag>
    <tag1>32434234</tag1>
    <tag2>junk character</tag2>
    </tag>'
    l_xml := XMLTYPE(l_clob);
    END;
    The value has is being populated into the tag1 and tag2 are coming from a oracle type that comes from a different service altogether.
    Thanks,
    VJ

    LPX-00217: invalid character 0 (U+0000)Looks like you have some ASCII 0 characters.
    What about if you do
    declare
         l_clob clob;
         l_xml  xmltype;
    begin
         l_clob := ' <tag>
    <tag1>32434234</tag1>
    <tag2>junk character</tag2>
    </tag>';
         l_xml := xmltype (replace (l_clob, chr (0)));
    end;
    /??

  • What`s going on with XML Parser version 2.0.2.7?

    Hi,
    In january, I was told on this forum by Steven Muench to wait version 2.0.2.7 of Oracle XML Parser to correct a textarea bug with <xsl:output method="HTML"... I would like to know what's going on and when should I expect this new version be available to download.
    Thanks!

    It's in testing right now. Will likely still be a couple more weeks before it's out on OTN.

  • Issue of xml parser on WAS

    this is regarding using oracle xml parser on WAS. we are facing the same issue as was posted on this forum
    xmlparserv2.jar cause IBM WebSphere v5.1 down.
    what i need to know is has there been any other issue even after implementing those solution? plz do reply
    Best Regadrs

    the error that we get on the server is : -
    SystemErr R java.lang.IncompatibleClassChangeError\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.tree.AbstractElement.setAttributes(AbstractElement.java:505)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXContentHandler.addAttributes(SAXContentHandler.java:916)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXContentHandler.startElement(SAXContentHandler.java:249)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:465)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.imf.dmfs.dal.util.dao.HibernateUtil.<clinit>(HibernateUtil.java:34)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at java.lang.J9VMInternals.initializeImpl(Native Method)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)\par
    2. the applications is being depl in WAR.
    3. ClassLoader Policy : parent last
    deleting META-INF/services folder in oracle parser jar file has no effect.
    PLZ HELP ME OUT

  • Having issue with XML in CDATA tag

    Currently I am having a major issue that I've been dealing with for the last four days unsuccessfully.  I run a search against our data provider (lets say the term searched on is 'foobar').  We get back an XML document on our server along with a list of objects that has the start index of where the hit terms are found and the length from the start of the index (our data provider calculates all of this for us).  We then take that XML document in its exact state as it's given to us from our data provider and wrap it in a CDATA tag and put it into another XML document and pass that to our FLEX app.  The document looks something like this coming back from the server (we're using REST).  This is not the true original document as it was shortened for readability.
    <?xml version="1.0" encoding="UTF-8"?>
    <Document>
    <ID>123456</ID>
    <HITTERMS>
    <HITTERM index="45" length="6" />
    <HITTERM index="105" length="6" />
    <HITTERM index="260" length="6" />
    </HITTERMS>
    <DocumentXML><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
    <DOC DOCUMENT_ID="123456" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <METADATA>
    <ID>123456</ID>
    <LANGUAGE>ENGLISH</LANGUAGE>
    <SOURCEDATA>1/1/2009</SOURCEDATA>
    <SOURCE>AP</SOURCE>
    </METADATA>
    <ARTICLE>
    <TITLE>Some title with foobar</TITLE>
    <TEXT>
    There would be just standard text.
    Some breaks for example like the start of new paragraphs, but otherwise all the foobar text would be condensed like this.
    </TEXT>
    </ARTICLE>
    </DOC>]]></DocumentXML>
    </Document>
    I've confirmed the XML coming from the server looks exactly as it does above. The issue is for some reason whenever I try to get the text out of '<DocumentXML>' it formats the code in a way that won't work for me since it throws off the offsets of the hit terms and changes the original document.  Whenever I do a .toString() on the XML it puts breaks before each '<' and after each '>' so it spaces everything out inside the CDATA tag.  Now the XML looks like this when turned into a string:
    <?xml version="1.0" encoding="UTF-8"?>
    <Document>
    <ID>123456</ID>
    <HITTERMS>
    <HITTERM index="45" length="6" />
    <HITTERM index="105" length="6" />
    <HITTERM index="260" length="6" />
    </HITTERMS>
    <DocumentXML><![CDATA[
    <?xml version="1.0" encoding="UTF-8"?>
    <DOC DOCUMENT_ID="123456" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <METADATA>
    <ID>123456</ID>
    <LANGUAGE>ENGLISH</LANGUAGE>
    <SOURCEDATA>1/1/2009</SOURCEDATA>
    <SOURCE>AP</SOURCE>
    </METADATA>
    <ARTICLE>
    <TITLE>Some title with foobar</TITLE>
    <TEXT>
    There would be just standard text.
    Some breaks for example like the start of new paragraphs, but otherwise all the foobar text would be condensed like this.
    </TEXT>
    </ARTICLE>
    </DOC>
    ]]>
    </DocumentXML>
    </Document>
    I need to be able to keep the original document as-is in the first example so I can calculate where the hit terms are so that I can highlight them and there are things further down the road that I'm going to need to be able to do so a simple search and replace will not get the job done unfortunately.  Has anyone ever encountered this before or have any idea possibly how to fix this.  Thanks in advance to anyone who can help with this.

    Didn't work.  Now it spaces out all of the XML, not just the document wrapped in the CDATA tag.  Looks like this now:
    <?xml version="1.0" encoding="UTF-8"?>
    <Document>
    <ID>123456</ID>
    <HITTERMS>
    <HITTERM index="45" length="6" />
    <HITTERM index="105" length="6" />
    <HITTERM index="260" length="6" />
    </HITTERMS>
    <DocumentXML>
    <![CDATA[<?xml version="1.0" encoding="UTF-8"?>
    <DOC DOCUMENT_ID="123456" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <METADATA>
    <ID>123456</ID>
    <LANGUAGE>ENGLISH</LANGUAGE>
    <SOURCEDATA>1/1/2009</SOURCEDATA>
    <SOURCE>AP</SOURCE>
    </METADATA>
    <ARTICLE>
    <TITLE>Some title with foobar</TITLE>
    <TEXT>
    There would be just standard text.
    Some breaks for example like the start of new paragraphs, but otherwise all the foobar text would be condensed like this.
    </TEXT>
    </ARTICLE>
    </DOC>
    ]]>
    </DocumentXML>
    </Document>

  • Issue with XML namespace and Message structure

    Hi All,
    I am using Oracle SOA Suite 11.1.1.4. I have SOA web service application one-way messaging wherein I keep receiving messages from the third party. The issue I am facing is with the XML namespaces which conflicts with the third party's message structure. The details are as below.
    Our Web-service WSDL*
    <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
    targetNamespace="http://amb.com/cad/RealTimeService"
    xmlns:cad="http://amb.com/cad/RealTimeService"
    xmlns:avl="http://schemas.com/asiapac/cad/datamodel/avl/1.0.0"
    xmlns:evn="http://schemas.com/asiapac/cad/datamodel/event/1.0.0"
    xmlns:uni="http://schemas.com/asiapac/cad/datamodel/unit/1.0.0"
    xmlns:dvt="http://schemas.com/asiapac/cad/datamodel/divert/1.0.0"
    xmlns:sui="http://schemas.com/asiapac/cad/datamodel/suppinfo/1.0.0"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://schemas.com/cad/datamodel/avl/1.0.0"
    schemaLocation="AvlCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/unit/1.0.0"
    schemaLocation="UnitCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/event/1.0.0"
    schemaLocation="EventCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/divert/1.0.0"
    schemaLocation="HewsCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/suppinfo/1.0.0"
    schemaLocation="SupplementalInformationCadSchema.xsd"/>
    <element name="AvlAuxData" type="avl:AvlAuxData" nillable="true"/>
    <element name="AgencyEvent" type="evn:AgencyEvent"/>
    <element name="Diversion" type="dvt:HospitalDiversionMessage"/>
    <element name="SupplementalInformation" type="sui:SupplementalInformation"/>
    <element name="UnitDetail" type="uni:UnitDetail"/>
    </schema>
    Using SOAP UI tool a HospitalDiversionMessage Request for the above WSDL will look like*
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <*real*:Diversion>
    <ns:Action>?</ns:Action>
    <ns:Open>?</ns:Open>
    <!--Optional:-->
    <ns:Location>?</ns:Location>
    <ns:Type>?</ns:Type>
    <ns:SubType>?</ns:SubType>
    <!--Optional:-->
    <ns:ExpiryTimestamp>?</ns:ExpiryTimestamp>
    <!--Optional:-->
    <ns:Comment>?</ns:Comment>
    <!--Optional:-->
    <ns:ItemNumber>?</ns:ItemNumber>
    <!--Optional:-->
    <ns:Notifications>?</ns:Notifications>
    <ns:CreatedTerminal>?</ns:CreatedTerminal>
    <ns:CreatedTimestamp>?</ns:CreatedTimestamp>
    <!--Optional:-->
    <ns:ClosedBy>?</ns:ClosedBy>
    <!--Optional:-->
    <ns:ClosedComments>?</ns:ClosedComments>
    <!--Optional:-->
    <ns:ClosedTerminal>?</ns:ClosedTerminal>
    <!--Optional:-->
    <ns:ClosedTimestamp>?</ns:ClosedTimestamp>
    </real:Diversion>
    </soapenv:Body>
    </soapenv:Envelope>
    Now the third party sends a HospitalDiversionMessage in this format_
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <ns0:Diversion>
    <ns0:Action>?</ns0:Action>
    <ns0:Open>?</ns0:Open>
    <!--Optional:-->
    <ns0:Location>?</ns0:Location>
    <ns0:Type>?</ns0:Type>
    <ns0:SubType>?</ns0:SubType>
    <!--Optional:-->
    <ns0:ExpiryTimestamp>?</ns0:ExpiryTimestamp>
    <!--Optional:-->
    <ns0:Comment>?</ns0:Comment>
    <!--Optional:-->
    <ns0:ItemNumber>?</ns0:ItemNumber>
    <!--Optional:-->
    <ns0:Notifications>?</ns0:Notifications>
    <ns0:CreatedTerminal>?</ns0:CreatedTerminal>
    <ns0:CreatedTimestamp>?</ns0:CreatedTimestamp>
    <!--Optional:-->
    <ns0:ClosedBy>?</ns0:ClosedBy>
    <!--Optional:-->
    <ns0:ClosedComments>?</ns0:ClosedComments>
    <!--Optional:-->
    <ns0:ClosedTerminal>?</ns0:ClosedTerminal>
    <!--Optional:-->
    <ns0:ClosedTimestamp>?</ns0:ClosedTimestamp>
    </ns0:Diversion>
    </soapenv:Body>
    </soapenv:Envelope>
    Questions*
    1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.
    2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its children
    Please suggest, I can attach the other imported XSD if need be.
    Thanks
    Edited by: user5108636 on Jun 13, 2011 6:55 PM
    Edited by: user5108636 on Jun 13, 2011 6:57 PM
    Edited by: user5108636 on Jun 13, 2011 7:02 PM

    Questions
    1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.The xml namespace suffixes like real and ns0 are just references used by the XML Parsers. For that matter the "real" can be xyz as well.
    You dont need to make any changes as long as the xml namespace suffixes refer to the same namespace.
    If you see the first soapUI xml and the third party xml have the same namespace references and hence it is not a problem:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <*real*:Diversion>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <*ns0*:Diversion>
    2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its childrenBased on this, logically both the xmls represent the same xml message. And hence you dont need to make any changes.
    Please refer to the basics of xml namespaces using the following links:
    http://en.wikipedia.org/wiki/XML_namespace
    http://zvon.org/comp/r/tut-Namespace.html#Pages~Introduction
    Let us know if you still need clarification.
    Hope this helps.
    Thanks,
    Patrick

  • Issue with XML output

    Hi All,
    We have a XML report output which is sent to users email as a word and pdf attachment. I see that the word attachment which is being sent to the user has RTF extension. I tried to modify the file extension to docx and test it to see if that works. The email comes up with the docx extension but when I try to open the attachment it asks for encoding and no matter which encoding I choose the o/p doesn't display properly.
    Does anyone have an idea of how to overcome this issue so that I might be able to send the user the word o/p with docx or doc extension instead of RTF.
    Any suggestions are highly appreciated.
    Thanks!!

    Hi,
    Might be worth logging a SR on this.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

Maybe you are looking for

  • Video problem with appletv

    I just purchased appletv and it works fine except when using the new app itunes live (itunes festival london).  When I try to play a concert from this app from my iphone to appletv I only get audio, no video on my big screen.  I get video to play jus

  • I want to start dbconsole for login in Enterprieise Manager

    I want to start dbconsole for login in Enterprieise Manager SET ORACLE_SID=ORCL Then I rename a folder in D:\app\hp\product\11.2.0\dbhome_1\oc4j\j2ee OC4J_DBConsole_192.168.1.2_ORCL Then run emctl status dbconsole I got following error EM configurati

  • Safari 3 and mail 3

    I try to send a link in safari and it can't send. It says unable to locate mail application. I have re-installed the new mail program, and it still won't send a link or contents of the page. Any possible solutions?

  • CVP Call Studio Database Element

    Hi all, I got the below error when I tried to use the Database element in CVP Call Studio to connect to a MSSQL database. touch111_24-7_Database,07/08/2014 13:52:31.724, The error was: A built-in element encountered an exception of type com.audium.se

  • T code VA14L

    Hi, I have a sales order that is blocked for delivery because I can see it in VKM5 but when I execute VA14L, the document is not included in the list.  What documents should be listed in VA14L? Thanks.