Help: XSU and extracting embedded xml

Hello
I am trying to pull data out of a relational database as XML using XSU. Some of the varchar2 columns in the database have embedded XML in them. When I pass in my select statement the returned XML escapes the emedded xml's special characters(turning them into entities) thus defeating the use of the embedded XML.
Is there some way to force XSU to NOT escape special characters so the embedded XML will remain intact? If not what would be the next best way to extract XML automatically from relational tables? My goal is to store the resulting XML from a query into a clob stored back in the database. So I'm not sure if I could even use XSQL pages.
Any help would be appreciated.
Kenneth

XSU can't help you to escape the special character now.
But after 9i if you store your xml into xmltype then the problem can be solved.
Currently you can use xslt to solve the problem,please refer to document demo for xsql.

Similar Messages

  • Extract embedded xml from PDF/A-3b (also creation)

    Hello there,
    in the context of a research project, we are currently trying to extract embedded xml from a PDF/A-3b document via code.
    The project deals with establishing a new invoicing standard (Zugferd: ferd-net.de, only german). Invoices are expressed via xml, which is embedded in PDF/A.
    What we are trying to archive is extraction of the xml via java code. For testing purposes, we are currently using an third party skd to extract the invoice-xml, by calling a .EXE file and then picking up the results in java.
    I currently have only one valid example file that can be processed via this sdk. To get more data, i used the test version of acrobat pro to alter the embedded xml file. To be more specific, i deleted the embedded file, added a new xml file, and used preflight to make the PDF conform to /A-3b. Although the file seems to have the same properties as the original, it can no more be processed via the extraction sdk. Since messing around with acrobat does not seem to get me anywhere, i am now looking into extracting data from the pdf my self.
    Is there any present implementation/library/solution for extracting data in a java context? The few third party tools i found are all based of a .net/windows native environment. I have heard rumors about Adobe giving out tools to extract embedded data from PDF/A?
    How is it the other way around? Is it possible to embedd xml into a PDF via Java? Given there allready is PDF file which we can attach to.
    I really appreciate reading and thanks for any help or input!
    Greetings,
    Florian

    Hi Florian,
    I would look for general purpose PDF libraries that can open a PDF and access data objects in it.
    All in all it is not too difficult to get to the embedded XML, once you have a library that can access and read data structures/data objects inside a PDF file. Some understanding of the inner workings of PDF data structures will help you get the job done (e.g. read the section about embedded files in the PDF standard / ISO 32000-1, as well as the chapter about PDF syntax).
    Olaf
    Am 19 Aug 2013 um 13:19 schrieb xfrapp <[email protected]>:
    Extract embedded xml from PDF/A-3b (also creation)
    created by xfrapp in PDF Language and Specifications - View the full discussion
    Hello there,
    in the context of a research project, we are currently trying to extract embedded xml from a PDF/A-3b document via code.
    The project deals with establishing a new invoicing standard (Zugferd: ferd-net.de, only german). Invoices are expressed via xml, which is embedded in PDF/A.
    What we are trying to archive is extraction of the xml via java code. For testing purposes, we are currently using an third party skd to extract the invoice-xml, by calling a .EXE file and then picking up the results in java.
    I currently have only one valid example file that can be processed via this sdk. To get more data, i used the test version of acrobat pro to alter the embedded xml file. To be more specific, i deleted the embedded file, added a new xml file, and used preflight to make the PDF conform to /A-3b. Although the file seems to have the same properties as the original, it can no more be processed via the extraction sdk. Since messing around with acrobat does not seem to get me anywhere, i am now looking into extracting data from the pdf my self.
    Is there any present implementation/library/solution for extracting data in a java context? The few third party tools i found are all based of a .net/windows native environment. I have heard rumors about Adobe giving out tools to extract embedded data from PDF/A?
    How is it the other way around? Is it possible to embedd xml into a PDF via Java? Given there allready is PDF file which we can attach to.
    I really appreciate reading and thanks for any help or input!
    Greetings,
    Florian
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5606424#5606424
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5606424#5606424
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5606424#5606424. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in PDF Language and Specifications by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.
    Olaf Druemmer | Managing Director | callas software GmbH | Schoenhauser Allee 6/7 | 10119 Berlin
    Tel +49.30.4439031-0 | Fax +49.30.4416402 | [email protected] | www.callassoftware.com
    Amtsgericht Charlottenburg, HRB 59615 | Geschäftsführung: Olaf Drümmer, Ulrich Frotscher

  • Extract Embedded XML within XML using XSLT

    Hi,
    We have a unique scenario where our incoming payload is coming from Oracle Database table which has one column of CLOB type storing complete raw XML.
    We need to extract this embedded raw XML and process it further, each XML has a unique XSD associated and we have that details in a separate column.
    So our DBAdapter incoming payload looks like below
    <rows>
    <row>
    <xml_xsd>xyz.xsd</xml_xsd>
    <xml>RAW XML DATA</xml>
    </row>
    <row>
    <xml_xsd>xyzv2.xsd</xml_xsd>
    <xml>RAW XML DATA</xml>
    </row>
    <row>
    <xml_xsd>xyzv2.xsd</xml_xsd>
    <xml>RAW XML DATA</xml>
    </row>
    <row>
    <xml_xsd>xyzv3.xsd</xml_xsd>
    <xml>RAW XML DATA</xml>
    </row>
    </rows>
    How can we leverage XSL Transformation to extract this embedded XML in each row? I need the each individual XML available for further mapping. I can split the payload using XPATH filtering per XSD, but not able to find a solution to parse the embedded XML and assign to a target schema?
    Research done so far points to do two transformations to get resulting XML or using Saxon Parser if available and use the parse() extension.
    Any other ideas/suggestions will be helpful. Challenge here is performance as i need to do this in bulk, will have many rows to process
    Thanks in advance.

    Hi,
    You dont have finite set of XSD's and probably you wont be creating a variable for each type of xsd from that finite set.
    Secondly, xslt doesnt support dynamic xpath as per my knowledge.
    Question:
    Do you really need XSD to do the validation?
    A possible solution to your question would be using java approach as below: Pass the xml and the xpath query
        public String evalXpath(String xml, String xpathQuery) {
              String xpathResult ;
            DocumentBuilderFactory domFactory =
                DocumentBuilderFactory.newInstance();
            try {
                DocumentBuilder builder = domFactory.newDocumentBuilder();
                InputSource is = new InputSource(new StringReader(xml));
                Document dDoc = builder.parse(is);
                XPath xPath = XPathFactory.newInstance().newXPath();
                Object result =
                    (NodeList)xPath.evaluate(xpathQuery, dDoc, XPathConstants.NODESET);
                NodeList nodes = (NodeList)result;
                for (int i = 0; i < nodes.getLength(); i++) {
                    xpathResult = nodes.item(i).getNodeValue();
                    System.out.println(xpathResult);
            } catch (Exception e) {
                e.printStackTrace();
            return xpathResult;
    Thanks,
    Rosh

  • Have XML with another embedded XML encoded in base64 - how to extract?

    Hi guys,
    I have a XML-RPC web service that returns a response like this:
    <methodResponse>
    <params>
    <param>
    <value>
    <base64>
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNlYXJjaFJlc3VsdD48bnVtcm93cz4xPC9udW1yb3dzPjxmb3VuZD4xPC9mb3VuZD48d29yZGluZm8+IGJvdMOjbyA6IDU8L3dvcmRpbmZvPjxzZWFyY2h0aW1lPjAuMDA2PC9zZWFyY2h0aW1lPjxmaXJzdGRvYz4xPC9maXJzdGRvYz48bGFzdGRvYz4xPC9sYXN0ZG9jPjx3b3JkaW5mb2FsbD5ib3TDo28gOiA1IC8gNTwvd29yZGluZm9hbGw+PGl0ZW0+PHVybGlkPjE5PC91cmxpZD48dXJsPmh0dHA6Ly9jZW50cmFsL2dhcnJhcy9RdWVtX21hdG91X0pGSy9hcnRlZmF0b3MvaHRtLzc1MDUuaHRtPC91cmw+PGNvbnRlbnQ+dGV4dC9odG1sPC9jb250ZW50Pjx0aXRsZT5Tb3VuZE1BWDwvdGl0bGU+PGtleXdvcmRzPjwva2V5d29yZHM+PGRlc2M+PC9kZXNjPjx0ZXh0Pi4uLiBlIGNvbXVuaWNhw6fDo28gdmlhIEludGVybmV0LiBDbGlxdWUgbm8gJmx0O2ZvbnQgY29sb3I9JnF1b3Q7MDAwMDg4JnF1b3Q7Jmd0OyZsdDtiJmd0O2JvdMOjbyZsdDsvYiZndDsmbHQ7L2ZvbnQmZ3Q7IGNvbSBvIGxvZ290aXBvIEFuZHJlYSBlbSAuLi4gYWRxdWlyaXIgdW1hIGF0dWFsaXphw6fDo28sIGNsaWNhbmRvIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gbyDDrWNvbmUgRm9uZSBkZSBvdXZpZG8uIERlcG9pcyBkZSAuLi4gJyBWaXJ0dWFsIEVhcicnICwgYmFzdGFuZG8gY2xpY2FyIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gw61jb25lIE91dmlkby4gQXDDs3MgYWRxdWlyaXIgZSA8L3RleHQ+PHNpemU+MTg1MDM8L3NpemU+PHJhdGluZz41LjUwNSU8L3JhdGluZz48bW9kaWZpZWQ+MTAvMDgvMjAwMiAxNjo1ODoxMCAtMDQwMDwvbW9kaWZpZWQ+PG9yZGVyPjE8L29yZGVyPjxjcmM+LTE5NjM3MDA5MzQ8L2NyYz48Y2F0ZWdvcnk+PC9jYXRlZ29yeT48bGFuZz5lbi11czwvbGFuZz48Y2hhcnNldD53aW5kb3dzLTEyNTI8L2NoYXJzZXQ+PHNpdGVpZD40NjE1ODk0NjE8L3NpdGVpZD48cG9wX3Jhbms+MC4wMDAwMDwvcG9wX3Jhbms+PG9yaWdpbmlkPjA8L29yaWdpbmlkPjwvaXRlbT48L3NlYXJjaFJlc3VsdD4K
    </base64>
    </value>
    </param>
    </params>
    </methodResponse>The base64 value is another XML embedded document that I have to extract.
    I have the following code (don't know if it's the best approach), where l_val is a CLOB and l_xml is XMLTYPE:
    l_val := DBMS_XMLGEN.convert( l_xml.extract('/methodResponse/params/param/value/base64/text()').getclobval(), 1 );How can I decode the base64-encoded contents of the l_val CLOB and store the result into another CLOB that I can then process with xmlsequence() and extract()?
    Thanks in advance. Regards,
    Georger

    Hi mdrake,
    I saw your answer on the other thread :)
    I know about the 32K limitation; that's why I need to store the decoded CLOB in another CLOB, as bigger documents will often be the case. I've been reading about this for a while, to no avail.
    Do you believe BASE64_DECODE_CLOB could be changed to return CLOB rather than VARCHAR2? Regards,
    Georger
    mdrake wrote:
    You'll need to do some work in this if the Encoded XML is bigger than 32K
    SQL> set long 10000 pages 0
    SQL> CREATE OR REPLACE FUNCTION BASE64_DECODE_CLOB (INPUT CLOB)
    2  return VARCHAR2
    3  as
    4    V_RAW_BUFFER RAW(32767);
    5    V_VARCHAR2_BUFFER VARCHAR2(32767);
    6  begin
    7    V_VARCHAR2_BUFFER := DBMS_LOB.SUBSTR(INPUT,32767,1);
    8    V_RAW_BUFFER := UTL_RAW.CAST_TO_RAW(V_VARCHAR2_BUFFER);
    9    V_RAW_BUFFER :=  UTL_ENCODE.BASE64_DECODE(V_RAW_BUFFER);
    10    V_VARCHAR2_BUFFER := UTL_RAW.CAST_TO_VARCHAR2(V_RAW_BUFFER);
    11    return V_VARCHAR2_BUFFER;
    12  end;
    13  /
    Function created.
    SQL> set serveroutput on
    SQL> --
    SQL> with XML as
    2  (
    3  select XMLType(
    4  '<methodResponse>
    5  <params>
    6  <param>
    7  <value>
    8  <base64>
    9  PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNlYXJjaFJlc3VsdD48bnVtcm93cz4xPC9udW1yb3dzPjxmb3VuZD4xPC9mb3VuZD48d29yZGl
    uZm8+IGJvdMOjbyA6IDU8L3dvcmRpbmZvPjxzZWFyY2h0aW1lPjAuMDA2PC9zZWFyY2h0aW1lPjxmaXJzdGRvYz4xPC9maXJzdGRvYz48bGFzdGRvYz4xPC9sYXN0ZG9jPjx
    3b3JkaW5mb2FsbD5ib3TDo28gOiA1IC8gNTwvd29yZGluZm9hbGw+PGl0ZW0+PHVybGlkPjE5PC91cmxpZD48dXJsPmh0dHA6Ly9jZW50cmFsL2dhcnJhcy9RdWVtX21hdG9
    1X0pGSy9hcnRlZmF0b3MvaHRtLzc1MDUuaHRtPC91cmw+PGNvbnRlbnQ+dGV4dC9odG1sPC9jb250ZW50Pjx0aXRsZT5Tb3VuZE1BWDwvdGl0bGU+PGtleXdvcmRzPjwva2V
    5d29yZHM+PGRlc2M+PC9kZXNjPjx0ZXh0Pi4uLiBlIGNvbXVuaWNhw6fDo28gdmlhIEludGVybmV0LiBDbGlxdWUgbm8gJmx0O2ZvbnQgY29sb3I9JnF1b3Q7MDAwMDg4JnF
    1b3Q7Jmd0OyZsdDtiJmd0O2JvdMOjbyZsdDsvYiZndDsmbHQ7L2ZvbnQmZ3Q7IGNvbSBvIGxvZ290aXBvIEFuZHJlYSBlbSAuLi4gYWRxdWlyaXIgdW1hIGF0dWFsaXphw6f
    Do28sIGNsaWNhbmRvIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gbyD
    DrWNvbmUgRm9uZSBkZSBvdXZpZG8uIERlcG9pcyBkZSAuLi4gJyBWaXJ0dWFsIEVhcicnICwgYmFzdGFuZG8gY2xpY2FyIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA
    4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gw61jb25lIE91dmlkby4gQXDDs3MgYWRxdWlyaXIgZSA8L3RleHQ+PHNpemU
    +MTg1MDM8L3NpemU+PHJhdGluZz41LjUwNSU8L3JhdGluZz48bW9kaWZpZWQ+MTAvMDgvMjAwMiAxNjo1ODoxMCAtMDQwMDwvbW9kaWZpZWQ+PG9yZGVyPjE8L29yZGVyPjx
    jcmM+LTE5NjM3MDA5MzQ8L2NyYz48Y2F0ZWdvcnk+PC9jYXRlZ29yeT48bGFuZz5lbi11czwvbGFuZz48Y2hhcnNldD53aW5kb3dzLTEyNTI8L2NoYXJzZXQ+PHNpdGVpZD4
    0NjE1ODk0NjE8L3NpdGVpZD48cG9wX3Jhbms+MC4wMDAwMDwvcG9wX3Jhbms+PG9yaWdpbmlkPjA8L29yaWdpbmlkPjwvaXRlbT48L3NlYXJjaFJlc3VsdD4K
    10  </base64>
    11  </value>
    12  </param>
    13  </params>
    14  </methodResponse>') OBJECT_VALUE
    15  from dual
    16  )
    17  select XMLSERIALIZE(DOCUMENT XMLTYPE(BASE64_DECODE_CLOB(extract(OBJECT_VALUE,'/methodResponse/params/param/value/base64/text()'
    ).getClobVal())) as CLOB INDENT SIZE=2)
    18    from XML
    19  /
    <?xml version="1.0" encoding="UTF-8"?>
    <searchResult>
    <numrows>1</numrows>
    <found>1</found>
    <wordinfo> botπo : 5</wordinfo>
    <searchtime>0.006</searchtime>
    <firstdoc>1</firstdoc>
    <lastdoc>1</lastdoc>
    <wordinfoall>botπo : 5 / 5</wordinfoall>
    <item>
    <urlid>19</urlid>
    <url>http://central/garras/Quem_matou_JFK/artefatos/htm/7505.htm</url>
    <content>text/html</content>
    <title>SoundMAX</title>
    <keywords/>
    <desc/>
    <text>... e comunicaτπo via Internet. Clique no &lt;font color="000088&
    quot;&gt;&lt;b&gt;botπo&lt;/b&gt;&lt;/font&gt; com o logotipo Andrea em ... adqu
    irir uma atualizaτπo, clicando no &lt;font color="000088"&gt;&lt;b&gt;
    botπo&lt;/b&gt;&lt;/font&gt; com o φcone Fone de ouvido. Depois de ... &apos; Vi
    rtual Ear&apos;&apos; , bastando clicar no &lt;font color="000088"&gt;
    &lt;b&gt;botπo&lt;/b&gt;&lt;/font&gt; com φcone Ouvido. Ap≤s adquirir e </text>
    <size>18503</size>
    <rating>5.505%</rating>
    <modified>10/08/2002 16:58:10 -0400</modified>
    <order>1</order>
    <crc>-1963700934</crc>
    <category/>
    <lang>en-us</lang>
    <charset>windows-1252</charset>
    <siteid>461589461</siteid>
    <pop_rank>0.00000</pop_rank>
    <originid>0</originid>
    </item>
    </searchResult>
    SQL>And don't expect it to be the fastest soln in history.

  • I need help. My ipad 2 was stuck in recovery mode. i tried to connect it to itunes and restore but after downloading the file and extracting the software there is a pop up message that says "the device is full" i dont know what to do. Its been 2 days now.

    I need help. My ipad 2 was stuck in recovery mode. i tried to connect it to itunes and restore but after downloading the file and extracting the software there is a pop up message that says "the device is full. Deleting files and emptying your recycle been will help you restore." how am i going to erase files if i can't open my ipad. i dont know what to do. Its been 2 days now. please help. thanks.

    yes i am sure. This are the exact words... "The iPad "iPad" could not be restored. The disk you are attempting to use is full. (Removing files and emptying the recycle bin will free up additional space". i tried some options, hard reset, redsnow, tinyumbrella but still it's stuck.

  • Need help in JAXP - saving and loading of XML

    i am new to JAXP so dunno how to write the codes to save and load a hub project to and from an XML stream ...so can any one help by posting some codes to guide me alonr... will be grateful to u...this is wat i have done ,can anyone help to complete it ..thank...urgently
    import java.util.*;
    public class Testvector
         private Vector m_vProcess;
         String strProjectName;
         public static void main(String[] args)
              TestVector pThis = new TestVector();
              pThis->WriteToXML(m_vProcess);
         public TestVector
              strProjectName ="Project1";
              m_vProcess = new Vector();               
              m_vProcess.add("Process1");
              m_vProcess.add("Process2");
         public void WriteToXML(Vector vProcess)
              //JAXP
              //write project element with attribute name
              //iterate through all the elements in vector m_vProcess
              //write process elements with name.
    <?xml version='1.0' encoding='utf-8'?>
    <!-- project -->
    <project>
    <!-- process -->
    <process type="all">
    <name>1st</name>
    </process>
    </project>
    can any one help?

    Choose Xerces2.4 to serialize the DOM object is an option.
    javac XercesTest.java -classpath xmlParserAPIs.jar;xercesImpl.jar;.
    java -classpath xmlParserAPIs.jar;xercesImpl.jar;. XercesTest test.xml
    below is the source file: XercesTest.java
    //JAXP
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    //APACHE SERIALIZE FUNCTION
    import org.apache.xml.serialize.*;
    class XercesTest
    public static void main(String[] args) throws Exception
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.parse( new File( args[0] ) );
    File f = new File( "copy_of_"+ args[0] );
    OutputFormat format = new OutputFormat("xml","UTF-8",true ) ;
    FileOutputStream fout = new FileOutputStream( f );
    XMLSerializer ser = new XMLSerializer(fout, format );
    ser.serialize( doc );
    maybe it's helpful
    land

  • Extracting the xml from string and parse it

    Hi all,
    I have a webservice, and calling one of the methods, returns xml data but store this data in a string.
    For example:
    String str = keysstub.getUserLMLArray(UserID,hash, Provider, Filter.ALL,TimeStampString).getXmlResults();returns <id>123456</id><id>123457</id><id>123458</id><id>123459</id><id>123461</id>and stores it in str.
    I have to take read this xml from the string and parse it accordingly to retreive the data from it.
    Please suggest how i can parse this xml from the string. it will be of great help. Code snippets from anyone would be of great help
    Thanks and Regards,
    Shikha

          * Get DOM document from a string containing valid XML.
          * @param string String to read XML content from.
         * @param varargs Optional arguments: 1: Validating?, 2: NamespaceAware?
          * @return DOM document or null if failed.
         * @throws Exception if failed.
         static public Document toDocument(String string, boolean... varargs) throws Exception {
            Document result = null;
            if (string != null) {
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                if (varargs != null && varargs.length > 0) {
                    int count = varargs.length;
                    if (count > 0) {
                        factory.setValidating(varargs[0]);  //needs error handler
                    if (count > 1) {
                        factory.setNamespaceAware(varargs[1]);
                DocumentBuilder db = factory.newDocumentBuilder();
                result = db.parse(new InputSource(new StringReader(string)));
            }//else: input unavailable
            return result;
        }//toDocument()and don't forget that the string must be valid xml, so in your example the header is missing and the first element must embrace all subsequent elements, e.g.
    <?xml version="1.0"?>
    <ids>
    <id>123456</id><id>123457</id><id>123458</id><id>123459</id><id>123461</id>
    </ids>

  • XMLAGG giving ORA-19011 when creating CDATA with large embedded XML

    What I'm trying to achieve is to embed XML (XMLTYPE return type) inside a CDATA block. However, I'm receiving "ORA-19011: Character string buffer too small" when generating large amounts of information within the CDATA block using XMLCDATA within an XMLAGG function.
    Allow me to give a step by step explanation through the thought process.
    h4. Creating the inner XML element
    For example, suppose I have the subquery below
    select
        XMLELEMENT("InnerElement",DUMMY) as RESULT
    from dual
    ;I would get the following.
    RESULT                           
    <InnerElement>X</InnerElement>h4. Creating outer XML element, embedding inner XML element in CDATA
    Now, if I my desire were to embed XML inside a CDATA block, that's within another XML element, I can achieve it by doing so
    select
        XMLELEMENT("OuterElement",
            XMLCDATA(XML_RESULT)
        ) XML_IN_CDATA_RESULT
    FROM
    (select
        XMLELEMENT("InnerElement",DUMMY) as XML_RESULT
    from dual)
    ;This gets exactly what I want, embedding XML into CDATA block, and CDATA block is in an XML element.
    XML_IN_CDATA_RESULT                                                       
    <OuterElement><![CDATA[<InnerElement>X</InnerElement>]]></OuterElement>    So far so good. But the real-world dataset naturally isn't that tiny. We'd have more than one record. For reporting, I'd like to put all the <OuterElement> under a XML root.
    h4. Now, I want to put that data in XML root element called <Root>, and aggregate all the <OuterElement> under it.
    select
        XMLELEMENT("Root",
            XMLAGG(
                XMLELEMENT("OuterElement",
                    XMLCDATA(INNER_XML_RESULT)
    FROM
        (select
             XMLELEMENT("InnerElement",DUMMY) as INNER_XML_RESULT
         from dual)
    ;And to my excitement, I get what I want..
    <Root>
        <OuterElement><![CDATA[<InnerElement>X</InnerElement>]]></OuterElement>
        <OuterElement><![CDATA[<InnerElement>Y</InnerElement>]]></OuterElement>
        <OuterElement><![CDATA[<InnerElement>Z</InnerElement>]]></OuterElement>
    </Root>  But... like the real world again... the content of <InnerElement> isn't always so small and simple.
    h4. The problem comes when <InnerElement> contains lots and lots of data.
    When attempting to generate large XML, XMLAGG complains the following:
    ORA-19011: Character string buffer too smallThe challenge is to keep the XML formatting of <InnerElement> within CDATA. A particular testing tool I'm using parses XML out of a CDATA block. I'm hoping to use [Oracle] SQL to generate a test suite to be imported to the testing tool.
    I would appreciate any help and insight I could receive, and hopefully overcome this roadblock.
    Edited by: user6068303 on Jan 11, 2013 12:33 PM
    Edited by: user6068303 on Jan 11, 2013 12:34 PM

    That's an expected error.
    XMLCDATA takes a string as input, but you're passing it an XMLType instance, therefore an implicit conversion occurs from XMLType to VARCHAR2 which is, as you know, limited to 4000 bytes.
    This indeed gives an error :
    SQL> select xmlelement("OuterElement", xmlcdata(inner_xml))
      2  from (
      3    select xmlelement("InnerElement", rpad(to_clob('X'),8000,'X')) as inner_xml
      4    from dual
      5  ) ;
    ERROR:
    ORA-19011: Character string buffer too small
    no rows selectedThe solution is to serialize the XMLType to CLOB before passing it to XMLCDATA :
    SQL> select xmlelement("OuterElement",
      2           xmlcdata(xmlserialize(document inner_xml))
      3         )
      4  from (
      5    select xmlelement("InnerElement", rpad(to_clob('X'),8000,'X')) as inner_xml
      6    from dual
      7  ) ;
    XMLELEMENT("OUTERELEMENT",XMLCDATA(XMLSERIALIZE(DOCUMENTINNER_XML)))
    <OuterElement><![CDATA[<InnerElement>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(use getClobVal method if your version doesn't support XMLSerialize)

  • XSU and multiple tables

    Hi,
    So far I have success using XSU to store an XML file to a single table datawise where each element of the XML correspond to the field name of the table.
    But I have couple of questions.
    1. I am still using ROWSET and ROW tags in my XML. Can i change it to something meaningful say...PRODUCTS and PRODUCT respectively? If so how can i do that?
    2. How do i stored an XML onto more than one table. Each PRODUCT have some linked information to be stored in another table. How can i do this?
    Basically this time the XML will look somewhat like this:
    <?xml version="1.0" ?>
    <ROWSET>
    <ROW num="0">
    <BRAND>brand name</BRAND>
    <CATEGORY>category</CATEGORY>
    <ROWSET1>
    <ROW1>
    <MERCHANT>merchant name</MERCHANT>
    </ROW1>
    </ROWSET1>
    </ROW>
    </ROW>
    </ROWSET>
    Please help me. Thank you.
    Regards,
    Abdul Rasheed

    Hi,
    search this xml form for 'multiple tables' and you will learn a lot about it. it seems that using XSU you can only to save to one table or a view. Possible solutions are:
    1. create a view over those tables. If your view is complex and not
    updatable then you can use insteadof triggers with your
    non-updatable view"
    2. split your mutl-level XML to several single level XML files and save each xml seperately.
    3. And another person was nice enough to mail me the following solution, which might be of help. i copy the mail here...
    I saw your message in the XML oracle forum, and i've just finished a small project for my company in doing things like saving an XML document to a DB table.
    I think that saving the XML document in one or many tables is not different because what you need is to build dynamic SQL queries to update your tables so you need to guess the setter part of the querry.
    UPDATE my_table SET column1=value1,column2=value2... WHERE table_key=key_value.
    the best way to do the job is to use an XSLT processor, you give it your XML document and an XSL document for filtering the output.
    the output of the XSLT processor could look like:
    <?xml version="1.0" ?>
    <ROOT>
    <TABLEROW table="table1">
    <COLUMN1_1>value1_1</COLUMN>
    </TABLEROW>
    <TABLEROW table="table2">
    <COLUMN1_2>value1_2</COLUMN>
    </TABLEROW>
    </ROOT>
    now it's easier to guess the SQL queries all you have to do is to parse this output document and say in you code something like:
    String[NBR_OF_TABLES] Queries;
    int i=0;
    -- Loop inside the xml document {
    Queries="UPDATE ";
    Queries[i]=+(curent_node.getAttribute("table")).getNodeValue();
    -- Loop inside the curent node {
    column_name=current_node.getNodeName();
    column_value=curent_node.getChild().getNodeValue();
    Queries[i]=+" SET "+column_name+"="+column_value; //FIRST TIME
    Queries[i]=+","+column_name+"="+column_value; //2,3,4...
    you may need some type conversion, from string to numbers,and dates, and the WHERE part of the query is up to your indexation mecanism
    of course you can put the tables primary keys values and names rigth in the yout XML document.
    and last you simply execute the Array of queries you have:
    for (int i=0i<NBR_OF_TABLES;i++)
    execute(Queries[i]) .
    hope this helps.
    abdul rasheed

  • Does EBS license include tools for reporting and extracting data (queries)

    Hello,
    I'm recommending Oracle EBS to a customer and I need to mention what tools for reporting and extracting data (queries) are included in a Oracle EBS license.
    I hope you can help me with that information, or at least with providing me the place where I can get the info.
    Thanks in advance,
    A/P Sergio Maestri

    Hi,
    Thanks, I think the same ... but the customer asked me about it ... I supose my answer will be that he can use Reports Builder for reporting and Toad or PLSQL Developer to access to the database and make queries ...
    What about XML Publisher ? ...it can be used to make reports against an Oracle EBS database and integrate them into the EBS Application ?I believe you need a developer license to use Oracle Developer (Forms/Reports) for customizing/creating reports.
    Global Pricing and Licensing
    http://www.oracle.com/corporate/pricing/index.html
    And IINM, the same thing applied to XML Publisher -- See this thread for a similar discussion.
    eBiz & XML Publisher - Confusion
    http://forums.oracle.com/forums/thread.jspa?messageID=3834445
    Please contact your Oracle sales representative, he/she is the best one to answer such questions.
    Thanks,
    Hussein

  • Extract from XML

    Hi to everyone,
    I'm new in Oracle and I've - maybe trivial - a problem in a select. (I'm using Oracle 10g Express Edition).
    I've a DB with a field CLOB: mytab.xml
    This column have an XML like this:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <info>
    <id> 954 </id>
    <idboss> 954 </isboss>
    <name> Fausto </name>
    <sorname> Anonimo </sorname>
    <phone> 040000000 </phone>
    <fax> 040000001 </fax>
    </info>
    I'm trying to do a 'simple' select to get, for example, the value of 'fax' tag. But I've a bit of problem and I'm not able to understand my error. For example:
    select extract(xml, '//fax').getStringVal() from mytab;
    ORA-00932: inconsistent datatypes: expected - got
    select extract(xmltype(xml), '//fax').getStringVal() from mytab;
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.XMLTYPE", line 254
    I've tryed also with 'extractvalue', but I've the same problems.
    where I'm wrong to do this?
    Edited by: 833498 on 3-feb-2011 0.45

    I have tried your query on 10g database and could not replicate problem.
    create table anagrafica (id number, xml clob);
    create table succeeded.
    insert into anagrafica values (1, '<?xml version="1.0" encoding="iso-8859-1"?>
    <anagrafica>
    <idanagrafica> 938 </idanagrafica>
    <idresponsabile> 938 </idresponsabile>
    <identi> 0 </identi>
    <idimpresa> 416 </idimpresa>
    <idruoli> 10 </idruoli>
    <nome> XXXXXX </nome>
    <cognome> YYYYYYY </cognome>
    <codicefiscale> TAXTAXTAX </codicefiscale>
    <natoA> Bozen </natoA>
    <dataNascita> 11/11/1911 </dataNascita>
    <telefono> 0233333333 </telefono>
    <fax> 0233333333 </fax>
    <email> [email protected] </email>
    <stato> operativo </stato>
    <statoAlbo> 10 </statoAlbo>
    <procura />
    <dataModifica> 03/07/2010 </dataModifica>
    <dataIscrizione> 03/07/2010 </dataIscrizione>
    <password> caa6ff044343b1e548eaa1a851b00f </password>
    <Username> Zzzzzzzzz </Username>
    </anagrafica>');
    1 rows inserted
    Select Extract(Xmltype(Xml),'/anagrafica/fax/text()').Getstringval() As Xml_Result From Anagrafica;
    XML_Result
    0233333333
    So it seems that there is no error in the query itself.
    The error related to numeric or value error might be a bit of the clue: Please note that the return value has spaces on both sides. If you try to assign it to numeric variable, you might get such error.
    Not sure if it helped.

  • Allow LR3 to view/extract embedded JPEGs inside NEF files please!

    I am a Nikon shooter, and use NX2 because of it's excelent RAW conversion of NEFS.
    The number one feature I'd like to see in LR3 would be the ability for LR to both display and extract the embedded JPEGs inside the NEF files rather than making it's own conversion. Maybe have an option to convert or extract as PhotoMechanic does on a mac for example.
    The number two feature I'd like to see added would be the ability to send RAW NEF files to an external editor.
    I believe these two features together would satisfy a lot of frustrated LR and NX users.

    Me too
    all I want is for LR to use my current Nef settings, NX2 or original as a starting point for adjustments  NX2 simply does it BETTER for most things - I just want to to final tweaks in LR/photoshop..........not start from scratch with a crap rendering that's way worse than the original.   exportng to tif befoe import into LR is insane !!!
    I have thousands of images - there's no way I'm going to laboriously manually copy every nuance of my settings - different for every image - into LR - I just want LR to work properly and respect the file I give it
    Please - there must be a tool out there that can help -perhaps even Adobe could help ???

  • Extracting embedded graphics

    I've inherited a bunch of FrameMaker files where all the graphics were embedded in the document rather than imported by reference. When I right click on a graphic and select Object Properties, of course it says, "Referenced File: No File."
    Is there any way I can do some sort of global redirect to have them all go to a graphics folder to reference the graphic rather than embedding them? Or am I just hosed?
    Since I don't know the file names, I'd have to hunt through the gazillion graphics folders until I found the right graphics to re-import (by reference, of course) -- in a 300 page document! GAH!
    Here's what I've tried: running a List Of...References, a List of Figures, Bruce Foster's Archive, swearing at the previous people who did this (and who aren't here anymore) -- all to no avail!
    Any help and/or advice (other than "turn around and run as fast as you can...") would be greatly appreciated.
    Anne

    "Extracting embeded graphics" for jpg, gif, .. and eps is one of the wonderful features of TOOLBOX for FrameMaker.
    Now, TOOLBOX for FrameMaker 7.0, 7.1, 7.2, 8.0, 9.0 download is available again: www.toolboxforme.com/downloads
    There are order forms: For US only, GErmany and other countries: http://www.squidds.de/en/products/price-lists.html
    Please fill it out.  If you need the previous TOOLBOX release (6, 7, 8), then please write a note in the field note.
    -- George

  • Urgent Help required! - Storing the XML as String instead as a file

    Hi,
    I need urgent help on this.
    I have an XML file. I have used org.w3c.dom to build dom and manipulate the XML file.
    I have updated the values for some of the nodes and I have deleted some of the unwanted nodes.
    I am able to save the output of the DOM as another XML file using
    either transform class or XMLSerializer with OutputFormatter class.
    But my requirement is to save the output of the DOM into a String instead of a file.
    When I save it in String, I need to have the following XML decalration and DOCTYPE declration also with it.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE Test SYSTEM "Test.dtd">
    Can anyone pls help me in this??
    Thanks in Advance. Expecting some inpputs pls....!
    Regards,
    Gayathri.

    hi,
    i think this is what u want
        public static String getXmlString(Document d) {
          StringWriter strResponse = null;
          try {
             OutputFormat format  = new OutputFormat(d);
             strResponse = new StringWriter();
             XMLSerializer serial = new XMLSerializer( strResponse, format );
             serial.asDOMSerializer();
             serial.serialize(d.getDocumentElement());
          catch (Exception e) {
            System.out.println(e.toString());
          return strResponse.toString();
    }HTH
    vasanth-ct

  • How Can I Attach and Link an XML file to a 3D Model in a PDF?

    How Can I Attach and Link an XML file to a 3D Model in a PDF?
    What I am trying to do is find out how to have a 3D model and a parts list linked to it within the PDF file.  I would also like to be able to add to the parts list if at all possible once the pdf has been created.  A template to create future PDF's with the 3D model and list might also be useful.
    I am not entirely sure if this is all possible within a PDF file, but I have viewed a PDF (Adidas Trainer) example which has a Excel file attached to it which links to the 3D model.  I have also had a look at partner products such as Lattice, Tetra4D, Anark, which can do animations and all sorts, but frankly it seems a bit overkill for what I am looking to do.
    Please, any help would be appreciated.  Thanks

    AlliCT59 wrote:
    > Shared Object sounds like it would work, but hten agian,
    I'm really stuck!
    >
    > Thanks for any help.
    >
    > Allison
    I wrote about it while ago, let me paste the whole thing.
    This example has simple
    buttons which upon click go to new sites and in the same time
    place record in form
    of *.SOL file on user drive. That record is read when you hit
    the next button and
    based on that the button will be selected as the one last
    clicked.
    You could use the very same thing just instead of suppressing
    button simply gotoAndPlay frame
    to continue the part you need.
    http://groups.google.com/group/macromedia.flash.actionscript/browse_thread/thread/36649453 1f4fd02d/245a57d0cdaa1d29?lnk=st&q=&rnum=3&hl=en#245a57d0cdaa1d29
    The source is in a different place, i re-upload for you :
    http://www.flashfugitive.com/stuff/SharedObj_urlcheck/
    fla file
    http://www.flashfugitive.com/stuff/SharedObj_urlcheck/beentourl.fla
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

Maybe you are looking for

  • Reg: View cluster

    Hello All, How to find out the view cluster associated with a view ?

  • Send mail w/ CSV zip file as an attachement w/o using StrictXml2PlainBean

    Hi Experts, Is there any other way to send an email to target, that has a Zipped CSV file as an attachment, without using StrictXml2PlainBean? I can't use StrictXml2PlainBean because it only accepts up to 3 levels of Recordset in the message type str

  • Retina Display is making my new Monitor Pixilated.

    Recently, I have bought a new MacBook Pro Retina Display and an Hp Pavilion 27xi Monitor. I just hooked up my monitor to my laptop last night and I noticed the picture on my monitor is Pixilated. I've been told by a friend that it's because of my Ret

  • APEX 2.2 starting page.

    Hi All, I install oracle application express on linux es4 with out any issues. Thank you for installing Oracle Application Express. Oracle Application Express is installed in the FLOWS_020200 schema. my opmn status is [oracle@abc bin]$ ./opmnctl stat

  • Difference between the different structures while dealing with User-Exits

    While dealing with User-Exits, we come across the different structures/Tables like XVBAP,YVBAP,TVBAP,IVBAP,*VBAP.... What is the difference between them ?