Extracting XML with XDK

Hello,
What tools are within the XDK for simply pulling the data out of Oracle tables and creating XML output files?
Bart Torbert
[email protected]

The utility called XSU can do this.

Similar Messages

  • How to extract  XML with namespace?

    Hi all,
    Below is the XML i have :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012" xsi:schemaLocation="http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd">
    - <Request>
    <Memid>10</Memid>
    <Actid>32</Actid>
    <Pax>3</Pax>
    <Flt>2012-DEC-10</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    <Request>
    <Memid>1</Memid>
    <Actid>3</Actid>
    <Pax>2</Pax>
    <Flt>2012-DEC-12</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    </Transaction>
    I want to extract the element values :
    The below code will help me when i have no namespace , what must be done in order to work with namespace and etract element value
    v_string_xml :=
    ' //Request[' || TO_CHAR (counter_xml) || ']/Memid/text()';
    v_ssp_table (v_ssp_table.COUNT).memid :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request[' || TO_CHAR (counter_xml) || ']/Actid/text()';
    v_ssp_table (v_ssp_table.COUNT).actid :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request['
    || TO_CHAR (counter_xml)
    || ']/Pax/text()';
    v_ssp_table (v_ssp_table.COUNT).pax :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request[' || TO_CHAR (counter_xml) || ']/Flt/text()';
    v_ssp_table (v_ssp_table.COUNT).flt :=
    p_xml_in.EXTRACT (v_string_xml).getstringval ();
    v_string_xml :=
    '//Request['
    || TO_CHAR (counter_xml)
    || ']/Username/text()';
    v_ssp_table (v_ssp_table.COUNT).username :=
    p_xml_in.EXTRACT (v_string_xml).getstringval ();

    declare
      v_xml xmltype := xmltype( '<?xml version="1.0" encoding="UTF-8" ?>
    <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012" xsi:schemaLocation="http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd">
    <Request>
    <Memid>10</Memid>
    <Actid>32</Actid>
    <Pax>3</Pax>
    <Flt>2012-DEC-10</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    <Request>
    <Memid>1</Memid>
    <Actid>3</Actid>
    <Pax>2</Pax>
    <Flt>2012-DEC-12</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    </Transaction>' );
    begin
      for r_xml in ( select *
                     from xmltable( xmlnamespaces( default 'http://schemas.test.com/Support/Services/test1/2012' )
                                   , '/Transaction/Request'
                                   passing v_xml
                                     columns memid number path 'Memid'
                                           , actid number path 'Actid'
                                           , pax number path 'Pax'
                                           , flt varchar2(100) path 'Flt'
                                           , username varchar2(100) path 'Username'
      loop
        dbms_output.put_line( r_xml.memid );
        dbms_output.put_line( r_xml.actid );
        dbms_output.put_line( r_xml.pax );
        dbms_output.put_line( r_xml.flt );
        dbms_output.put_line( r_xml.username );
      end loop;
    end;

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

  • Oracle SQL - Extracting clob value from XML with repeating nodes

    Hi All,
    I am attempting to run SQL on a table (called test_xml with a column xml_data [data type xmltype]). The column contains xml with repeating nodes (description). The following statement runs successfully when the node contains data of a non clob size:
    SELECT
    extractvalue (Value (wl), '*/description')
    FROM test_xml
    , TABLE (xmlsequence (extract (xml_data, '*/record'))) wl
    but fails when description node contains a lot of data:
    ORA-01706: user function result value was too large
    I amended my query:
    SELECT
    extractvalue(Value (wl), '*/description').getClobVal()
    FROM test_xml
    , TABLE (xmlsequence (extract (xml_data, '*/record'))) wl
    but this fails with:
    ORA-22806: not an object or REF
    Thanks in Advance

    Hi Greg,
    11.2.0.2.0 (Although I will need to do this on my work instance also which is 10.2.0.4)That's gonna be a problem...
    Direct CLOB projection is supported starting with 11.2.0.2, using XMLTable or XMLCast/XQuery functions (extractvalue, extract, xmlsequence are deprecated now) :
    SELECT x.*
    FROM test_xml t
       , XMLTable(
           '/*/record'
           passing t.xml_data
           columns
             description  clob path 'description'
         ) x
    ;On prior versions, implicit conversions will occur to VARCHAR2 datatype, hence the limitation observed.
    AFAIK you have two options on 10.2.0.4 :
    1) Using Object-Relational storage, with the xdb:SQLType="CLOB" annotation.
    2) Using the following trick :
    SELECT dbms_xmlgen.convert(x.description.getClobVal(), 1) as description
    FROM test_xml t
       , XMLTable(
           '/*/record'
           passing t.xml_data
           columns
             description  xmltype path 'description/text()'
         ) x
    ;

  • XML with duble xmlns extract data truble, database 9i

    Hello,
    I am having problem extractin data from the example:
    My xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Document xmlns="http://www.crea.si/Schemas/2004/Document/ZbsXml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.crea.si/Schemas/2004/Document/ZbsXml ZbsCreaDoc.xsd">
    <Data>
    <DataFormat>
    <MimeType>text/xml</MimeType>
    </DataFormat>
    <Content>
    <EmbeddedData>
         <Paket xmlns="http://www.zbs-giz.si/Schemas/2006/ZbsXml">
         <VodilniZapis>
              <StevilkaRacuna>00000000</StevilkaRacuna>
              <StevilkaPaketa>0000</StevilkaPaketa>
              <DatumPaketa>0000-00-00</DatumPaketa>
         </VodilniZapis>
    </Paket>
    </EmbeddedData>
    </Content>
    </Data>
    </Document>
    my select:
    SELECT      extractValue(Value(t), 'VodilniZapis/StevilkaPaketa', 'xmlns="http://www.crea.si/Schemas/2004/Document/ZbsXml"')          MimeType
    FROM     TABLE(XMLSequence(extract(xm, '/Document/Data/Content/EmbeddedData/Paket/VodilniZapis', 'xmlns="http://www.crea.si/Schemas/2004/Document/ZbsXml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'))) t;
    it is not working except it I use only <Paket> insted of <Paket xmlns="http://www.zbs-giz.si/Schemas/2006/ZbsXml">
    Can anyopne help me? Thanks.

    Hi,
    Since child element "Paket" is from another namespace, you have to qualify it (and its descendants) in the XPath expression.
    Something like this should do :
    SELECT extractValue(value(t), 'VodilniZapis/StevilkaPaketa', 'xmlns="http://www.zbs-giz.si/Schemas/2006/ZbsXml"') mimetype
    FROM TABLE(
      XMLSequence(
        extract( xml, '/Document/Data/Content/EmbeddedData/ns2:Paket/ns2:VodilniZapis',
                 'xmlns="http://www.crea.si/Schemas/2004/Document/ZbsXml",
                  xmlns:ns2="http://www.zbs-giz.si/Schemas/2006/ZbsXml"' )
    ) t;

  • Error while extracting XML file from the application server

    Hi ,
    I am writing a XML file into the application server, after which when i try to extract the file to the local server using the report - RFASLDPC ,
    the file is extracted, but with a '#' symbol at the first position.
    Because of which the XML File does not open. But after i open the file in notepad and manually delete the '#' symbol and then reopen the file, it works fine.
    Is there any way to remove the '#' symbol while extracting itself ??
    Thanks in advance,
    Vikas.

    Select the option "No Character Set Conversion" in stead of Code page 1100.
    However, I still have troubles -> the downloaded xml file misses a space on several places. This causes errors too.

  • Re-Using XML file from decode barcode + extract xml process

    I was hoping someone could put me in the right direction here. I am decodeing the information stored in a 2D Bar code and sending this information to an XML file, then I am trying to combine that xml file with a blank PDF template but the process is failing beacuse there are some additional tag fields the XML data from the  Decode->Extract XML process.
    The XML file from the decode process gives the structure below..notice therer some extra tags (lines 2- 4)
    <?xml version="1.0" encoding="UTF-8"?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    <xfa:datasets>
    <xfa:data>
    <form1>
    The XML structure that is expected by the PDF template is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <form1>
    So the xml output of the Decode barcode + Extract XML process has three extra lines of tag. Is there a way I could use a process within liveCycle to clean out those three lines in real-time before sending the xml to be recombined with the PDF template.
    Thanks

    Hi,
    What you may do is to use the SetValue and its xpath builder functions to "serialize" the xml into string, "substring" to remove the extra tags, and "concat" to add the extra tags and then "deserialize" it again to an xml to be merged with your form.
    Greetings,
    Yasser

  • Extract XML from an XML File

    Hi All,
    I have an xml file from which data has to be extracted and inserted into table. XML file looks like this..
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE labels SYSTEM "label.dtd">
    <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017">
    <label>
    <variable name= "ITEM">PM191_JTEST</variable>
    <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
    <variable name= " LOT ">ja28-10</variable>
    <variable name= "QUANTITY">1</variable>
    </label>
    </labels>
    In the above xml, if i remove <!DOCTYPE labels SYSTEM "label.dtd"> and use the below query, I am able to get the details.
    SELECT EXTRACTVALUE(VALUE(x), 'labels/@_FORMAT') format
    ,EXTRACTVALUE(VALUE(x), 'labels/@_QUANTITY') QUANTITY
    ,EXTRACTVALUE(VALUE(x), 'labels/@_PRINTERNAME') PRINTERNAME
    ,EXTRACTVALUE(VALUE(x), 'labels/@_JOBNAME') JOBNAME
    FROM (SELECT XMLTYPE
    ('<?xml version="1.0" encoding="UTF-8" standalone="no"?> <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017"> <label> <variable name= "ITEM">PM191_JTEST</variable> <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable> <variable name= " LOT ">ja28-10</variable> <variable name= "QUANTITY">1</variable> </label> </labels>' ) xml
    FROM DUAL),
    TABLE(XMLSEQUENCE(EXTRACT(xml, 'labels'))) x
    But <!DOCTYPE labels SYSTEM "label.dtd"> tag is there means then i am getting error as
    Invalid resource handle or path name "/label.dtd"
    Please let me know how we can parse the xml and insert into table. OR how can i remove <!DOCTYPE labels SYSTEM "label.dtd"> tag and process it further.
    Thanks and Regards,
    Mahesh
    Edited by: magu on Sep 2, 2009 3:15 PM
    Edited by: magu on Sep 2, 2009 3:16 PM

    I don't understand why the DOCTYPE is in the XML, but it appears that Oracle is trying to resolve label.dtd to a registered resource. As you discovered, it may be easier to remove the DOCTYPE from the XML then try to register the label.dtd resource within Oracle. To do this, some options are
    - Use the REPLACE command
    - treat the data as a CLOB and instr/substr to build a new clob without the DOCTYPE tag in it.
    - Use the REGEXP_REPLACE command
    Also, if your DB version supports XMLTable, here is the way to do it with that.
    SELECT *
      FROM XMLTABLE('/labels'
                    PASSING XMLTYPE('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <labels _FORMAT="Harvest Label for Lot Project" _QUANTITY="1" _PRINTERNAME="PFP3400E006" _JOBNAME="JA272017">
         <label>
              <variable name="ITEM">PM191_JTEST</variable>
              <variable name="ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
              <variable name=" LOT ">ja28-10</variable>
              <variable name="QUANTITY">1</variable>
         </label>
    </labels>
                    COLUMNS
                    format    VARCHAR2(15) PATH '@_FORMAT',
                    quantity  VARCHAR2(15) PATH '@_QUANTITY',
                    printername  VARCHAR2(15) PATH '@_PRINTERNAME',
                    jobname  VARCHAR2(15) PATH '@_JOBNAME');

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

  • Easy accent (special character) translation to html numeric codes with xdk.

    Hi, I have an xml (obtained via xsql) with the correct special characters (spanish accents in this case), I got it in a servlet like:
                                            XSQLRequest req = new XSQLRequest(pageUrl);
    XMLDocument xsqlDoc = (XMLDocument)req.processToXML(params);
    XSLProcessor processor = new XSLProcessor();
    processor.setBaseURL(xslUrl);
    XSLStylesheet sheet = processor.newXSLStylesheet(xslUrl);
    processor.processXSL(sheet, xsqlDoc, out);
    This works fine, I got a pretty xml document like:
    <BLOQUE_B>
    <ROW num="1">
    <TITULO>Trabajos Topográficos Catastrales.</TITULO>
    <TITULO_RESTO>PolÃgono núm. 6</TITULO_RESTO>
    <RESPONSABILIDAD>Servicio de Catastro Topográfico Parcelario;</RESPONSABILIDAD>
    <ESCALA>Escala 1:5000</ESCALA>
    <FRASE_INTRODUC>Versión original</FRASE_INTRODUC>
    <DESCRIPCION_FISICA>1 plano</DESCRIPCION_FISICA>
    </ROW>
    </BLOQUE_B>
    The problem comes with the special characters (accents), I need to output as html codes:
    á --> &amp;#225;
    é --> &amp;#233;
    etc ...
    I've try with xdk 10 (xls v2), using the new character-map funcion, but it didn't work. (applying version="2.0" in the stylesheet and processor.setXSLTVersion(oracle.xml.parser.v2.XSLProcessor.XSLT20)
    in the servlet), (example in xml.com: http://www.xml.com/pub/a/2004/06/02/tr-xml.html)
    With xdk 9 (xls v1), I try with a string-replace template function (like the http://www.dpawson.co.uk/xsl/sect2/StringReplace.html), and it seens to work.
    It's there an easy way to make this?
    Why didn't work the character-map with xdk10 (xls v2))
    Thanks in advance
    Felipe Llano

    I found a solution, without using xsl, just with the jtidy library, as I need the translation via servlet, I did it with just a few lines like:
    PrintWriter out = response.getWriter();
    XSQLRequest req = new XSQLRequest(pageUrl);
    XMLDocument xsqlDoc = (XMLDocument)req.processToXML(params);
    ByteArrayOutputStream out2 = new ByteArrayOutputStream();
    ByteArrayOutputStream out3 = new ByteArrayOutputStream();
    xsqlDoc.print(out2);
    Tidy tidy = new Tidy();               
    tidy.setXmlTags(true);
    tidy.setXmlOut(true);
    tidy.parse(new ByteArrayInputStream(out2.toByteArray()), out3);
    out.print(out3.toString() );

  • 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

  • XML with Embedded XSL

    My company are sending reports to out customers by translating XML with an XSL file to generate a HTML file and then emailing it to our customers.
    At the moment we are using XALAN to process the XML through the Style Sheet.
    We would like to shift the processing onto our users by letting their browsers do the work.
    We cannot send the xml and xsl as 2 seperate files because the users would have to extract both files into the same location then open the XML.
    Is it possible to use embed XSL in XML for use in MS Internet Explorer???????
    I heard that not all translators support embedded XSL but I cant find any info on mdsn.
    Any help would be appreciated

    First, you are assuming that your customers are using Internet Explorer. If this is not the case, then your plan will fail.
    Second, Internet Explorer (in its current standard configuration) does not run XSLT as known to Xalan, but another similar, obsolete, non-standard language (called XSL by Microsoft). IE can be made to work with standard XSLT, by installing a special DLL.
    So you can do this if you like, but first you need to get more knowledge about the IE implementations of XSL (it is on MSDN!) and then you will need ongoing support for customers who need help configuring their browsers.
    As you can probably guess, I think your server-based scheme is a much better idea.

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

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

  • Extract Data with OPEN HUB to a Logical Filename

    Hi Experts,
    Can anybody help me in sending the link for How to guide...Extract Data with OPEN HUB to a Logical Filename?
    Thanks in advance.
    BWUser

    Hi,
    check this links...
    http://searchcrm.techtarget.com/generic/0,295582,sid21_gci1224995,00.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e698aa90-0201-0010-7982-b498e02af76b
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1570a990-0201-0010-1280-bcc9c10c99ee
    hope this may help you ..
    Regards,
    shikha

Maybe you are looking for

  • Unable to import any video

    I have iPhoto 9.5.1 running on Mavericks. The issue first appeared when iPhoto refused to import the only two movie files on my iPhone 5S running iOS 8, stating the two .mov files were in an unrecognizable format. I used the Image Capture tool to pul

  • Creative ALchemy 1.25.10 released!

    "Creative ALchemy .25.0 released!(Hi everyone, The Creative ALchemy .25.0 is available for download now. Creative ALchemy .25.0 Filesize : 8.2MB Release date : 20 Mar 09 File Name : ALMY_PCVTAPP_LB__25_0.exe Creative ALchemy restores 3D audio and EAX

  • Color Range "Local Group"

    Hello together, I just wonder what the new feature within the Select: Color Range Dialogue means. I'm using the german version, so I don't know how it's named in english, but it should be something like "local colorgroup". It's the only new feature i

  • I need to knew were can i put a code that will run after any step.

    i want that a specific code that i wrote will run after any step in the main sequence. this code suppose to increment a variable if the step is failed. i did not find the place in the VB Operator Interface that executed after each step. please tell m

  • FaceTime will not run after update to 10.6.7

    Updated the OS to 10.6.7 earlier today. Tried to run FaceTime this evening, and found that it will not start. First indication of a problem was that the FaceTime icon was missing, instead a generic icon was present. Tried to start FT, and found that