Inline XML with CDATA problem

Hi everyone,
I'm trying to include some JavaScript (JSON 2, to be precise)
in with some ActionScript 3 classes. I'm using the inline XML
method (E4X) of declaring the data. It looks like this:
public static var JSON_2:XML = <data><![CDATA[
if (!this.JSON) {
JSON = function () {
function f(n) {
return n < 10 ? '0' + n : n;
Date.prototype.toJSON = function (key) {
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function (key) {
return this.valueOf();
var cx = /[\u0000
]]></data>
Actually, this is only about a quarter of what I need to
include but this is where it breaks down. Right after the second
slash in the last line, Flash reports:
TypeError: Error #1091: XML parser failure: Unterminated CDATA
section.
In fact, as you can see this is a perfectly valid CDATA
section and isn't being terminated anywhere (there is no instance
of "]]>" anywhere in the data). Unfortunately, Flash doesn't
think so and seems to think that the backslash is an XML node
directive.
Does anyone have an idea of how to effectively deal with
this? The JSON source code has *many* backslashes so not having to
convert them would be *very* useful.
Many thanks for all your suggestions,
Patrick

I've *kind* of solved the problem...replacing each backslash
("\") with a double backslash ("\\"). At least this has removed the
compiler error. However, this would suggest that the CDATA section
is actually being interpreted by Flash, which is something it isn't
supposed to do...or did I misunderstand how this works?

Similar Messages

  • Problem while creating xml with cdata section

    Hi,
    I am facing problem while creating xml with cdata section in it. I am using Oracle 10.1.0.4.0 I am writing a stored procedure which accepts a set of input parameters and creates a xml document from them. The code snippet is as follows:
    select xmlelement("DOCUMENTS",
    xmlagg
    (xmlelement
    ("DOCUMENT",
    xmlforest
    (m.document_name_txt as "DOCUMENT_NAME_TXT",
    m.document_type_cd as "DOCUMENT_TYPE_CD",
    '<![cdata[' || m.document_clob_data || ']]>' as "DOCUMENT_CLOB_DATA"
    ) from table(cast(msg_clob_data_arr as DOCUMENT_CLOB_TBL))m;
    msg_clob_data_arr is an input parameter to procedure and DOCUMENT_CLOB_TBL is a pl/sql table of an object containing 3 attributes: first 2 being varchar2 and the 3rd one as CLOB. The xml document this query is generating is as follows:
    <DOCUMENTS>
    <DOCUMENT>
    <DOCUMENT_NAME_TXT>TestName</DOCUMENT_NAME_TXT>
    <DOCUMENT_TYPE_CD>BLOB</DOCUMENT_TYPE_CD>
    <DOCUMENT_CLOB_DATA>
    &lt;![cdata[123456789012345678901234567890123456789012]]&gt;
    </DOCUMENT_CLOB_DATA>
    </DOCUMENT>
    </DOCUMENTS>
    The problem is instead of <![cdata[....]]> xmlforest query is encoding everything to give &lt; for cdata tag. How can I overcome this? Please help.

    SQL> create or replace function XMLCDATA_10103 (elementName varchar2,
      2                                             cdataValue varchar2)
      3  return xmltype deterministic
      4  as
      5  begin
      6     return xmltype('<' || elementName || '><![CDATA[' || cdataValue || ']]>
      7  end;
      8  /
    Function created.
    SQL>  select xmlelement
      2         (
      3            "Row",
      4            xmlcdata_10103('Junk','&<>!%$#&%*&$'),
      5            xmlcdata_10103('Name',ENAME),
      6            xmlelement("EMPID", EMPNO)
      7         ).extract('/*')
      8* from emp
    SQL> /
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[SMITH]]></Name>
      <EMPID>7369</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[ALLEN]]></Name>
      <EMPID>7499</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[WARD]]></Name>
      <EMPID>7521</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[JONES]]></Name>
      <EMPID>7566</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[MARTIN]]></Name>
      <EMPID>7654</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[BLAKE]]></Name>
      <EMPID>7698</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[CLARK]]></Name>
      <EMPID>7782</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[SCOTT]]></Name>
      <EMPID>7788</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[KING]]></Name>
      <EMPID>7839</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[TURNER]]></Name>
      <EMPID>7844</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[ADAMS]]></Name>
      <EMPID>7876</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[JAMES]]></Name>
      <EMPID>7900</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[FORD]]></Name>
      <EMPID>7902</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[MILLER]]></Name>
      <EMPID>7934</EMPID>
    </Row>
    14 rows selected.
    SQL>

  • Transforming XML/XSLT : CDATA problem

    Hi!
    I have a problem transforming xml with XSLT using the API javax.xml.
    The result is correct until I have a CDATA section in my xml document.
    The transforming process encodes all the & < > (special characters) it finds in.
    This occurs problem for the follow of my treatement because the content of my CDATA is already encoded.
    For example, this xml code :
    <?xml version='1.0' encoding="ISO-8859-1" ?>
    <article>
    <article-contenu><![CDATA[Accent : &eacute; Signe : &lt;]]></article-contenu>
    </article>
    produces in my output :
    Accent : &amp;eacute; Signe : &amp;lt;
    This is my java code :
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Source xmlSource = new StreamSource(readerXml);
    Source xslSource = new StreamSource( fileXsl );
    // Generate the transformer.
    Transformer transformer = tFactory.newTransformer(xslSource);
    // Perform the transformation, sending the output to the response.
    transformer.transform(xmlSource, new javax.xml.transform.stream.StreamResult(sw));
    How can I tell the transformer not to do that?
    Thanks for your answers!

    I am having a similar problem. I have enclosed my text data in my xml file like this:
    <![CDATA[<b>Hello World!</b>]]>
    My select statement in my XSLT sheet is as follows:
    <xsl:value-of select="." disable-output-escaping="yes"/>
    I have tried setting xsl:output to text, to html, and to xml. The <, >, and & get converted to xhtml entities.
    Where should I begin to troubleshoot? If the Xalan xslt jars? My stylesheet. My xml doc? Java code?
    Any feedback welcome.

  • Using xml with datagrid - problem with element attributes ...

    Hi,
    When i try to set the datafield in a DataGridColumn to an
    attribute, ex.: @isPermaLink - the value is not printet in the
    datagrid?
    My code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="feedRequest.send()" layout="absolute"
    backgroundGradientColors="[#808080, #c0c0c0]">
    <mx:HTTPService id="feedRequest" url="
    http://kristianthrane.dk/feed"
    useProxy="false" />
    <mx:Panel x="10" y="10" width="475"
    title="{feedRequest.lastResult.rss.channel.title}" id="panel1"
    height="531">
    <mx:DataGrid id="dgPosts" x="20" y="20" width="100%"
    dataProvider="{feedRequest.lastResult.rss.channel.item.guid}"
    height="100%">
    <mx:columns>
    <mx:DataGridColumn headerText="Lande"
    dataField="@isPermaLink" />
    </mx:columns>
    </mx:DataGrid>
    </mx:Panel>
    </mx:Application>
    I hope someone has a tip ....
    Best regards,
    Kristian Thrane

    Hi Kristian,
    I'm with some problems, a bit alike yours, but from what I've seen, I would recomend you to see type errors...does the atribute "isPermaLink" inside the "guid" tag, or "title" tag?
    My problem is the opposite of what you have... I can place tag attributes in a datagrid, but I can't put in the same Datagrid the tag value. But I have no choice since the feed comes from a public webservice.
    My feed is:
    <search ver="3.0">
    <loc id="BRXX1094" type="1">Aveiro, Brazil</loc>
    <loc id="POXX0006" type="1">Aveiro, Portugal</loc>
    </search>
    <mx:DataGrid x="10" y="53" width="365" id="dgLocation" dataProvider="{wSearch.lastResult.loc}" itemClick="callService(event);">
    <mx:columns>
           <mx:DataGridColumn headerText="Localidade" dataField="loc"/> //This doesn't work
           <mx:DataGridColumn headerText="Referência" dataField="@id"/> //This does
    </mx:columns>
    </mx:DataGrid>
    Hope it give you any ideas.
    Beste regards
    Leonel

  • Styling XML with XSLT Problem with javax.xml.transform???

    I have been trying to make a transformation and seem to be having a problem in that javax.xml.transform can not be found while using jdk1.3....If I use jdk1.4, there is no problem....
    Does anyone know how I can get things to work using jdk1.3???
    (Description of what I am doing...1) Building XML Source 2) Setting up the XSLT File 3) Building Source Object 4) Build Result Object 5) Transforming the Data.....MY RESULT SHOULD BE AN HTML PAGE)
    I have tried putting xerces.jar and xalan.jar in my CLASSPATH....but this still doesn't work....onyl thing that has worked is using jdk1.4 as my JAVA_HOME....
    PLEASE HELP!!!!

    PLEASE HELP....your advice here would be greatly appreciated.....

  • Attempt to process file failed with Exception in XML Parser-format problem

    Hi all,
    Iam getting an unusual error in the J2EE stack in XI.
    And the message is:
    006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.
    This means that error occured during content conversion of XML to the prescribed file format.
    Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.
    Thanks in advance...
    karun

    Hi Bhavesh,
    Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.
    The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.
    2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -
    2006-11-30 17:30:50 Success Start converting XML document content to plain text
    2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'
    2006-11-30 17:31:07 Error Exception caught by adapter framework: null
    2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.
    2006-11-30 17:31:07 Success The message status set to WAIT.
    2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck
    2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck
    2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1

  • Problems embedding HTML into XML with CVIXMLSetElementValue - unwanted &lt and &gt

    I'm using the CVI XML functions. When I try to insert some pre-exsting HTML as the element value with CVIXMLSetElementValue, it dutifuly converts all the HTMLangle brackets into &lt and &gt, which is NOT what I want.
    (I can protect the XML integrity by wrapping it in [CDATA[ ....]] but that does not solve the conversion issue here.)
    Any suggestions?
    Thanks,
    Ian
    Solved!
    Go to Solution.

    To explain a bit further, below is a code snippet and the unwanted result that I see. Does this behavior - even with CDATA - make good design sense?
    From my perspective CVIXMLSetElementValue should respect CDATA elements. Am I right? Or just biased?
    stat = CVIXMLSetElementValue (test1_element, "Hello");
    stat = CVIXMLSetElementValue (test2_element, "<p>Hello</p>");
    stat = CVIXMLSetElementValue (test3_element, "<! [CDATA[<p>Hello</p>]] >");
    // Problematic Output:
    // <?xml version="1.0"?>
    // <root>
    // <test1>Hello</test1>
    // <test2>&lt;p&gt;Hello&lt;/p&gt;</test1>
    // <test3>&lt;! [CDATA[&lt;p&gt;Hello&lt;/p&gt;]] &gt;</test1>
    // </root>

  • Problem parsing XML with schema when extracted from a jar file

    I am having a problem parsing XML with a schema, both of which are extracted from a jar file. I am using using ZipFile to get InputStream objects for the appropriate ZipEntry objects in the jar file. My XML is encrypted so I decrypt it to a temporary file. I am then attempting to parse the temporary file with the schema using DocumentBuilder.parse.
    I get the following exception:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '<root element name>'
    This was all working OK before I jarred everything (i.e. when I was using standalone files, rather than InputStreams retrieved from a jar).
    I have output the retrieved XML to a file and compared it with my original source and they are identical.
    I am baffled because the nature of the exception suggests that the schema has been read and parsed correctly but the XML file is not parsing against the schema.
    Any suggestions?
    The code is as follows:
      public void open(File input) throws IOException, CSLXMLException {
        InputStream schema = ZipFileHandler.getResourceAsStream("<jar file name>", "<schema resource name>");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = null;
        try {
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          factory.setAttribute(JAXP_SCHEMA_SOURCE, schema);
          builder = factory.newDocumentBuilder();
          builder.setErrorHandler(new CSLXMLParseHandler());
        } catch (Exception builderException) {
          throw new CSLXMLException("Error setting up SAX: " + builderException.toString());
        Document document = null;
        try {
          document = builder.parse(input);
        } catch (SAXException parseException) {
          throw new CSLXMLException(parseException.toString());
        }

    I was originally using getSystemResource, which worked fine until I jarred the application. The problem appears to be that resources returned from a jar file cannot be used in the same way as resources returned directly from the file system. You have to use the ZipFile class (or its JarFile subclass) to locate the ZipEntry in the jar file and then use ZipFile.getInputStream(ZipEntry) to convert this to an InputStream. I have seen example code where an InputStream is used for the JAXP_SCHEMA_SOURCE attribute but, for some reason, this did not work with the InputStream returned by ZipFile.getInputStream. Like you, I have also seen examples that use a URL but they appear to be URL's that point to a file not URL's that point to an entry in a jar file.
    Maybe there is another way around this but writing to a file works and I set use File.deleteOnExit() to ensure things are tidied afterwards.

  • Javax.xml.stream.XMLInputFactory problems with &

    Hi all
    I am using javax.xml.stream.XMLInputFactory to create an XMLStreamReader, which reads XML in from a database.
    The problem is that when it encounters & entities, it is replacing them simply with &. When I then go to transform the XML with an XSL stylesheet, it fails with a parser error due to the presence of unescaped & characters.
    Looking at the API documentation, I thought that setting the property javax.xml.stream.isReplacingEntityReferences to false would solve the problem, but it isn't. The line of code I am using is as follows: -
    inputFactory.setProperty("javax.xml.stream.isReplacingEntityReferences", new Boolean(false));
    Any further ideas as to what I am doing wrong or what else I should be doing?
    Many thanks for reading and considering my post.
    Kind Regards
    Jon

    Thanks for your continued posts guys...
    Quote from DrClap: "So if you consider this to be a problem, you are most likely misunderstanding. Or is there a reason why you feel you have to know how the text was represented in the document it came from?"
    Right, just to clarify, this is what I'm trying to do...
    1. XML, complete with properly escaped characters (&, etc) is sitting in the database.
    2. Next, I am attempting to read the XML into memory character for character via an XMLInputStream and so I still want &, etc, not just &.
    3. Finally, I apply stylesheet to XML Now I do want the parser to decode the & into &. The problem is that it has already been done in 2 (above) so the parser in 3 falls over.
    Thanks for pointing out that javax.xml.stream.XMLInputFactory is not a standard class DrClap - looks like it's back to the drawing board for me!!
    Thanks
    Jon

  • Wrap XML with in CDATA using webservice

    Hi folks,
    i have a requirement to generate highlighted XML with in CDATA tag using web service for KENEXA integration.
    <?xml version="1.0"?>
    <Envelope version="01.00">
           <Sender>
                 <Id>HRISUSER</Id>                        
                 <Credential>100</Credential>       
           </Sender>
           <Recipient>
                 <Id/>
           </Recipient>
           <TransactInfo transactType="data">
                 <TransactId>5555</TransactId>                    
                 <TimeStamp>2006-02-28 09:22:10AM</TimeStamp> 
           </TransactInfo>
           <Packet>
                 <PacketInfo packetType="data">
                        <PacketId>1</PacketId>
                        <Action>SET</Action>
                        <Manifest>MANIFESTNAME</Manifest>   
                 </PacketInfo>
                 <Payload><![CDATA[<?xml version="1.0"?>
    <Foundation_Data>
           <Foundation_Item>
                 <Code>0001</Code>
                 <Description>Code 1</Description>
                 <Status>A</Status> 
           </Foundation_Item>
           <Foundation_Item>
                 <Code>0002</Code>
                 <Description>Code 2</Description>
                 <Status>I</Status> 
           </Foundation_Item>
    </Foundation_Data>
    ]]></Payload>
           </Packet>
    </Envelope>
    To know more about kenexa integration  Foundation Integrations
    Please guide me with this.
    Regards,
    Srinivasan R.

    Hi folks,
    i have a requirement to generate highlighted XML with in CDATA tag using web service for KENEXA integration.
    <?xml version="1.0"?>
    <Envelope version="01.00">
           <Sender>
                 <Id>HRISUSER</Id>                        
                 <Credential>100</Credential>       
           </Sender>
           <Recipient>
                 <Id/>
           </Recipient>
           <TransactInfo transactType="data">
                 <TransactId>5555</TransactId>                    
                 <TimeStamp>2006-02-28 09:22:10AM</TimeStamp> 
           </TransactInfo>
           <Packet>
                 <PacketInfo packetType="data">
                        <PacketId>1</PacketId>
                        <Action>SET</Action>
                        <Manifest>MANIFESTNAME</Manifest>   
                 </PacketInfo>
                 <Payload><![CDATA[<?xml version="1.0"?>
    <Foundation_Data>
           <Foundation_Item>
                 <Code>0001</Code>
                 <Description>Code 1</Description>
                 <Status>A</Status> 
           </Foundation_Item>
           <Foundation_Item>
                 <Code>0002</Code>
                 <Description>Code 2</Description>
                 <Status>I</Status> 
           </Foundation_Item>
    </Foundation_Data>
    ]]></Payload>
           </Packet>
    </Envelope>
    To know more about kenexa integration  Foundation Integrations
    Please guide me with this.
    Regards,
    Srinivasan R.

  • Problem with demo : Round-Tripping XML with Oracle9i

    Hi,
    We have recently installed a 9.2.0.1.0 database with the intention of trying some of the new XMLTYPE samples.
    I downloaded the demo : Round-Tripping XML with Oracle9i.
    The first part, Mapping XML into Oracle9i, worked fine.
    The second part, Re-composing XML from Oracle9i, doesn't seem to run.
    Here is what I get i SQLPLUS :
    (Step 1 to 15 is OK)
    SQL> create or replace type PURCHASEORDER_TYPE as object
    2 (
    3 "Reference" VARCHAR2(64),
    4 "Actions" SYS.XMLTYPE,
    5 "Requester" VARCHAR2(48),
    6 "User" VARCHAR2(32),
    7 "Reject" PURCHASEORDERREJECTION_TYPE,
    8 "CostCenter" VARCHAR2(3),
    9 "Vendor" VARCHAR2(32),
    10 "PONumber" NUMBER(10),
    11 "ShippingInstructions" PURCHASEORDERSHIPINST_TYPE,
    12 "SpecialInstructions" VARCHAR2(2048),
    13 "LineItems" SYS.XMLTYPE
    14 );
    15 /
    Type created.
    SQL> --script 16
    SQL> create or replace view PURCHASEORDERDOCUMENTS as
    2 select P.REFERENCE,
    3 sys_xmlgen(
    4 PURCHASEORDER_TYPE(
    5 P.REFERENCE,
    6 (
    7 select
    8 sys_xmlagg(
    9 sys_xmlgen(
    10 PURCHASEORDERACTION_TYPE(
    11 A.ACTIONEDBY,
    12 A.DATEACTIONED
    13 ),
    14 sys.xmlgenformattype.createFormat('Action')
    15 )
    16 ).extract('//Action')
    17 from PURCHASEORDERACTIONS A
    18 where A.REFERENCE = P.REFERENCE
    19 ),
    20 P.REQUESTER,
    21 P.USERID,
    22 PURCHASEORDERREJECTION_TYPE(
    23 R.REJECTEDBY,
    24 R.DATEREJECTED,
    25 R.COMMENTS
    26 ),
    27 P.COSTCENTER,
    28 P.VENDOR,
    29 P.PONUMBER,
    30 PURCHASEORDERSHIPINST_TYPE(
    31 S.SHIPTONAME,
    32 S.ADDRESS,
    33 S.PHONE
    34 ),
    35 P.SPECIALINSTRUCTIONS,
    36 (
    37 select
    38 sys_xmlagg(
    39 sys_xmlgen(
    40 PURCHASEORDERLINEITEM_TYPE(
    41 L.LINENO,
    42 L.DESCRIPTION,
    43 PURCHASEORDERPART_TYPE(
    44 L.PARTNO,
    45 L.QUANTITY,
    46 L.UNITPRICE
    47 )
    48 ),
    49 sys.xmlgenformattype.createFormat('LineItem')
    50 ),
    51 sys.xmlgenformattype.createFormat('LineItems')
    52 )
    53 from PURCHASEORDERLINEITEMS L
    54 where P.REFERENCE = L.REFERENCE
    55 )
    56 ),
    57 sys.xmlgenformattype.createFormat('PurchaseOrder')
    58 ) "PODOCUMENT"
    59 from PURCHASEORDERSTORE P,
    60 PURCHASEORDERREJECTION R,
    61 PURCHASEORDERSHIPINSTRUCTIONS S
    62 where R.REFERENCE = P.REFERENCE
    63 and S.REFERENCE = P.REFERENCE;
    View created.
    SQL> --script 17
    SQL> set heading off;
    SQL> set wrap on
    SQL> set pagesize 10000;
    SQL> set long 10000;
    SQL> select P.PODOCUMENT.getClobVal() from PURCHASEORDERDOCUMENTS P;
    select P.PODOCUMENT.getClobVal() from PURCHASEORDERDOCUMENTS P
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 1
    Has anyone had the same problem ?? I would appreciate any suggestions.
    Thanks,
    Frank

    I found the solution :
    The database was running with a multibyte characterset (UTF8).
    After changing that to WE8ISO8859P1 everything worked fine.
    It is strange that Oracle suggest to use UTF8 when installing the new database (9i)
    and on the other hand doesn't support multibyte charactersets for several of the XML-products.
    Cheers,
    Frank

  • Problem while using XML with Oracle

    I have a problem using XML with oracle applications
    The process I am following
    1. Making a XML string.
    2. Parsing it to get a document
    3. Free the parser using xmlparser.freeparser
    4. Traversing through nodes .
    5. Freeing the document.
    The whole Process is executed in batch mode.
    The problem occurs after executing the procedure for 5000 records and I get the error
    ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
    heap","library cache")
    Can you please help me out to overcome this problem
    It's urgent
    I have
    Oracle version 8.1.7.0.0
    XML version 1.2
    OS Windows NT
    To resolve the problem I have increase shared memory size and java initialization parameters ,which seems OK
    Looking forward for your answer.

    Hello, Reena
    Your process flow seems to be correct in term of getting/freeing memory.
    Following error
    The problem occurs after executing the procedure for 5000 records and I get the error
    ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
    heap","library cache")may be caused by memory leaks in xdk or memory fragmentation(due to get/free memory cycle)
    To find out if this is an memory leak issue you could try to monitor V$SGASTAT from one session while running your batch process in another session.
    To prevent (or lower its impact) fragmentation issues try to PIN objects, and adjust java_pool_size and shared_pool_reserved_size.
    Anyway, counsult your Oracle DBA.
    Oracle version 8.1.7.0.0I think, you should apply database patch first of all. The latest one (8.1.7.4.x) could be accured from Metalink.

  • Assigning xml to CDATA in OSB

    Hi!
    I have a Tuxedo proxy service in Oracle Service Bus. It recieves an XML. First, I want to know how to transform this XML to CDATA to be sent as an argument to an web service operation. And secondly - how to transform the responce in the web service, which is in a CDATA section to an XML to be manipulated afterward.

    I have a Tuxedo proxy service in Oracle Service Bus. It recieves an XML. First, I want to know how to transform this XML to CDATA to be sent as an argument to an web service operation. Simple example where given XML is converted into CDATA element in $body
    Replace . in variable body with fn-bea:serialize(xs:string(fn:concat("<![CDATA[",fn-bea:serialize($body),"]]>")))
    Replace node contents selected
    Input
    <manoj/>
    Output (forums is not not showing the data in the CDATA)
    <![CDATA[<soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><manoj/></soap-env:Body>]]>
    Let me know if this solves the first problem.
    Edited by: mneelapu on Apr 29, 2009 10:03 AM

  • Nested XML from recordset problems.

    Hi
    I have been struggling with this for a while now and desperatley need som help!
    I'm trying to create a nested spryregion that looks like this:'
    http://www.soulkompetens.se/utbildningar.php#
    Problem with that page is that it only works in Safari (mac). Firefox the encoding does not work (questionmarks instead of åäö).
    Windows explorer does not work at all .
    So I started to work wit the http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html page to try to generate the xml.
    The XML should be something like:
    <DOCUMENT>
      <ROW0>
        <UTBILDNING_ID>22</UTBILDNING_ID>
        <RUBRIK>Värdegrunden som bas för affärsutveckling</RUBRIK>
        <ROW1>
          <INGRESS>Värdegrunden som bas för affärsutveckling, diskrimineringsgrunderna</INGRESS>
          <ID>17</ID>
         <TEXT></TEXT>
          <DATUM>0000-00-00</DATUM>
        </ROW1>
        <ROW1>
          <INGRESS>Västra Götaland 3:e september</INGRESS>
          <ID>34</ID>
          <TEXT></TEXT>
          <DATUM>2009-06-21</DATUM>
        </ROW1>
      </ROW0>
      <ROW0>
        <UTBILDNING_ID>25</UTBILDNING_ID>
        <RUBRIK>Omvärldsanalys</RUBRIK>
        <ROW1>
          <INGRESS>Mellersta Norrland 11:e december</INGRESS>
          <ID>35</ID>
          <TEXT></TEXT>
          <DATUM>0000-00-00</DATUM>
        </ROW1>
    </ROW0>
    </DOCUMENT>
    I get the XML from two joined Tables in the database.
    Sql looks like:
    select utbildning_rubrik.utbildning_id, utbildning_rubrik.rubrik, utbildning.ingress, utbildning.ID, utbildning.text, utbildning.datum
    from utbildning_rubrik, utbildning where utbildning_rubrik.utbildning_id = utbildning.utbildning_id
    order by utbildning_rubrik.utbildning_id, utbildning.ingress
    Now! How do I generate the XML with "query to xml".
    I have been trying a lot of things an my head is spinning around
    Can anybody help me please.
    Regards
    Olle

    Thank you for the answer.
    I think I am close. But there is something wrong wit the nesting of the nodes and repeating.
    Here is the code:
    <?php
    mysql_select_db($database_SOUL, $SOUL);
    $query_rsImages = "SELECT utbildning_rubrik.utbildning_id, utbildning_rubrik.rubrik, utbildning.ingress, utbildning.ID, utbildning.text, utbildning.datum FROM utbildning_rubrik, utbildning WHERE utbildning_rubrik.utbildning_id = utbildning.utbildning_id ORDER BY utbildning_rubrik.utbildning_id, utbildning.ingress";
    $rsImages = mysql_query($query_rsImages, $SOUL) or die(mysql_error());
    $row_rsImages = mysql_fetch_assoc($rsImages);
    $totalRows_rsImages = mysql_num_rows($rsImages);
    // Send the headers
    header('Content-type: text/xml');
    header('Pragma: public');       
    header('Cache-control: private');
    <?php echo('<?xml version="1.0" encoding="ISO-8859-1"?>'); ?>
    <DOCUMENT>
      <?php if ($totalRows_rsImages > 0) { // Show if recordset not empty ?>
        <ROW0>
        <UTBILDNING_ID><?php echo $row_rsImages['utbildning_id']; ?></UTBILDNING_ID>
        <?php do { ?><RUBRIK><?php echo $row_rsImages['rubrik']; ?>
      <ROW1>
            <?php do { ?><INGRESS><?php echo $row_rsImages['ingress']; ?></INGRESS>
            <TEXT><![CDATA[<?php echo $row_rsImages['text']; ?>]]></TEXT><?php } while ($row_rsImages = mysql_fetch_assoc($rsImages)); ?>
            </ROW1>
            </RUBRIK><?php } while ($row_rsImages = mysql_fetch_assoc($rsImages)); ?>
            </ROW0>
       <?php } // Show if recordset not empty ?>
    </DOCUMENT>
    In the other php document consuming the xml I have
    ds1.setColumnType("RUBRIK", "html");
    So the main problem with this is I dont know php so good that I can repeat the nodes to my choise.
    I neew it to be
    ROW0>
      <UTBILDNING_ID></UTBILDNING_ID>
      <RUBRIK></RUBRIK>
      <ROW1>
        <INGRESS></INGRESS>
        <TEXT></TEXT>
        <DATUM>/DATUM>
      </ROW1>
      <ROW1>
        <INGRESS></INGRESS>
        <TEXT></TEXT>
        <DATUM></DATUM>
      </ROW1>
    </ROW0>
    <ROW0>
      <UTBILDNING_ID></UTBILDNING_ID>
      <RUBRIK></RUBRIK>
      <ROW1>
        <INGRESS></INGRESS>
       <ID></ID>
        <TEXT></TEXT>
        <DATUM></DATUM>
      </ROW1>
      </ROW1>
    </ROW0>
    Can you help?
    Regards
    Olle

  • Exception in XML Parser (format problem?)

    Hi Experts,
    I am working on IDOC -> AS2 Configuration and the AS2 Configuration has the below structure
    <RecordSet>
         <Row1>
                       <row1 - field1>
                       <row1 - field2>
                       <row1 - field3>
         </Row1>
         <Row2>
                       <row2 - field1>
                       <row2 - field2>
                       <row2 - field3>
         </Row2>
         <Records>
              <Record1>
                        <Record1-Field1>
                        <Record1-Field1>
                        <Record1-Field1> 
              </Record1>
              <Record2>
                        <Record2-Field1>
                        <Record2-Field1>
                        <Record2-Field1> 
              </Record2>
         </Records>
    </RecordSet>
    We are getting the expected Structure when we AS2 Receiver has the xml format. But while doing module development with the strctxml2Plain, we are getting the below error  in RWB CC Monitoring.
    Message processing failed. Cause: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.NullPointerException''; nested exception caused by: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.NullPointerException'
    Any ideas, why this error we are getting.....
    Thanks in advance,
    Regards,
    Vasu

    Hi Vasu,
    Not in the Mapping of IR.
    In BIC Mapping Designer you have to test with the standard Mappings by providing the sample file whether the Conversion is happening correctly or not.
    You have to take the same input file that what ever you are having now.
    So that it will say clearly what is the problem in converting the XMLto the required EDI Format...
    Check whether you have any Date Format Values are comming from the input file.
    Regards
    Seshagiri

Maybe you are looking for

  • Need help with iMovie storage on external Hard drive

    Is there any external HD that is fast enough to run iMovie? I just bought an 80gig ext. hard drive trying to solve that nasty memory problem that iMovie HD has... Well iMovie will not run because it's not fast enough, and the video clips play slow an

  • Can I connect my Mac to my TV via RCA cables?

    I'm trying to connect my new Mac Mini to a TV that doesn't have HDMI nor DVI. It only has RCA connections and a Scart. I bought a converter to VGA from the Mac and another converter to RCA, but I only got a black screen on TV. Does anyone know how ca

  • HT204150 Why aren't my contacts showing up on iCloud from my phone?

    So, I am attempting to use the icloud feature to create groups. However, when I go on my icloud contacts, none of my contacts show up from my phone! My accounts are linked, etc etc. How do I get them to show up? The only thing that shows up is my nam

  • Fit Image CS4: Error: Unable to create Window - OS error [1400]:210

    Hi there, I'm running Vista Ultimate 64 bit Photoshop CS4 Extended and have come across a problem with the Automate/Fit Image script. I have read the other posts here concerning a bug in the script, but I'm not even getting to the stage of the script

  • Serial Number conflict on CSS upgrade

    I just bought Dreamweaver CS3 mac upgrade. When the program asks for a serial number of a previous install, (because it can not find my Studio files for some reason) All I have is my previous Studio 8 SN: which the CS3 won't accept. What can I do?