Parse an Aggregate in XML Document using PL/SQL

Hi. I've been successful with parsing a TAG in XML Document stored in CLOB using PL/SQL XML Parser.
However, I need help on how to get the whole aggregate in XML Document stored in CLOB.
sample XML Doc :
<library>
<book>
<title>Oracle Complete Reference</title>
<author>Kevin</Author>
<year>2000</year>
</book>
<video>
<title>Learning C++</title>
<length>2 hours</length>
<video>
</library>
I need a function that will accept an Input which is the aggregate name and will return the aggregate value.
With the sample XML above, say the input is 'VIDEO', the function will return :
<video>
<title>Learning C++</title>
<length>2 hours</length>
<video>
I'll really appreciate any help.
null

I used such an example to parse several Varchar2 strings in a given DB session:
BEGIN
parser := xmlparser.newparser ;
xmlparser.parsebuffer(parser,xmlout) ;
domdoc := xmlparser.getDocument(parser) ;
xmlparser.FREEPARSER(parser) ;
parser.id := -1 ;
nodes := xslprocessor.selectNodes(
xmldom.makenode(domdoc),
'Positionen/Position') ;
for i in 1 .. xmldom.getLength(nodes) loop
node := xmldom.item(nodes,i-1) ;
-- do s/thing with the node
end loop ;
xmldom.freedocument(domdoc) ;
RETURN(komponenten) ;
EXCEPTION
WHEN OTHERS THEN
if parser.id <> -1 then xmlparser.freeparser(parser) ;
end if ;
if domdoc.id <> -1 then xmldom.freedocument(domdoc) ;
end if ;
RAISE ;
END ;
However, after about 2000 of nodes lists parsed, I get an ArrayIndexOutOfBoundsException from XMLNodeCover. Obviously, I should release the nodes or the nodelist, but I have not found any procedure to do this.
Pascal

Similar Messages

  • Validation of an XML document using an XMLSchema !

    Hi all,
    i have an xml document and an XmlSchema.
    Well, my mission is validate the xml document using the XmlSchema and give the message true or false to the user.
    What is the best,easier and faster way to do this ?
    Cheers.
    Stefano

    I would like to do the same thing only I would like to use JAXP. The JAXP 1.2 samples show the following code to accomplish this:
    final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
    //create and configure SAX parser factory
    SAXParserFactory spf = SAXParserFactory.newInstance();
    spf.setNamespaceAware(true);
    spf.setValidating(true);
    //create and configure SAX parser
    SAXParser saxParser = spf.newSAXParser();
    saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
    saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File(schemaSource));
    //parse XML document
    saxParser.parse(new InputSource(xmlURI), myDefaultHandler);
    However, I would like to use the default Crimson parse that ships with J2SE 1.4. Is there a way to accomplish this using the default Crimson parser that only support JAXP 1.1?

  • Error while loading an XML document using a structured application

    Hi,
    I try to load an XML document using a structured application defined in the default structapps.fm
    My code is shown down, extracted from the FDK API code sample.
    Problem, I always have the same message :
    "Cannot find the file named e:\xml\AdobeFrameMaker10\file. Make sure that the file exists. "
    Where "e:\xml\AdobeFrameMaker10\" is my install directory.
    So I assume that frame try to find the structapps.fm file but does not find it.
    What else can it be ?
    Does anyone knowns how to achieve this simple task using extendScript ?
    Thanks for any comments, Pierre
    function openXMLFile(myLastFile) {
        var filename = myLastFile.openDlg("Choose XML file ...", "*.xml", false);
        if (filename != null) {
            /* Get default open properties. Return if it can’t be allocated. */
            var params = GetOpenDefaultParams();
            /* Set properties to open an XML document*/
            /*Specify XML as file type to open*/
            var i = GetPropIndex(params, Constants.FS_OpenAsType)
            params[i].propVal.ival = Constants.FV_TYPE_XML;
            /* Specify the XML application to be used when opening the document.*/
            i = GetPropIndex(params, Constants.FS_StructuredOpenApplication)
            params[i].propVal.sval = "myApp";
            i = GetPropIndex(params, Constants.FS_FileIsOldVersion)
            params[i].propVal.ival = Constants.FV_DoOK
            i = GetPropIndex(params, Constants.FS_FontNotFoundInDoc)
            params[i].propVal.ival = Constants.FV_DoOK
            i = GetPropIndex(params, Constants.FS_FileIsInUse)
            params[i].propVal.ival = Constants.FV_DoCancel
            i = GetPropIndex(params, Constants.FS_AlertUserAboutFailure)
            params[i].propVal.ival = Constants.FV_DoCancel
            /*The structapps.fm file containing the specified application must have
            already been read. The default structapps.fm file is read when FrameMaker is
            opened so this shouldn't be a problem if the application to be used is
            listed in the structapps.fm file.*/
            var retParm = new PropVals()
            var fileObj = Open(filename, params, retParm);
            return fileObj
        } else {
            return null;

    Pierre,
    Depending on the object "myLastFile", the method openDlg might not even exist (if the myLastFile object is not a File object, for instance). And I do not see any need for the myLastFile anyhow, as you are presenting a dialog to select a file to open. I recommend using the global ChooseFile( ) method instead. This will give you a filename as string in full path notation, or null when no file was selected in the dialog. I am not sure what your ExtendScript documentation states about the return value for ChooseFile, but if that differs from what I am telling you here, the documentation is wrong. So, if you replace the first lines of your code with the following it should work:
    function openXMLFile ( ) {
        var filename = ChooseFile ( "Choose XML file ...", "", "*.xml", Constants.FV_ChooseSelect );
    While writing this, I see that Russ has already given you the same advice. Use the symbolic constant value I indicated to use the ChooseFile dialog to select a single file (it can also be used to select a directory or open a file - but you want to control the opening process yourself). Note that this method allows you to set a start directory for the dialog (second parameter). The ESTK autocompletion also gives you a fifth parameter "helplink" which is undocumented and can safely be ignored.
    Good luck
    Jang

  • How to fill an oracle CLOB with a XML document using Unicode UTF8

    Hi,
    I'm working with C# and oracle database v8.1.7 (release 3), and i'm having some problems to fill correctly an oracle CLOB parameter with XML document using UTF8 encoding.
    It works fine with "Encoding.Unicode" but not with "Encoding.UTF8". The problem is that i can't use Unicode (UTF16) with oracle 8.
    Can someone help me ? Thanks.
    Here is my code.
    OracleTransaction tx = conn.BeginTransaction();
    OracleCommand cmd = conn.CreateCommand();
    cmd.Transaction = tx;
    cmd.CommandText = "declare xx clob; begin dbms_lob.createtemporary(xx, false, 0); :tempclob := xx; end;";
    cmd.Parameters.Add(new OracleParameter("tempclob", OracleType.Clob)).Direction = ParameterDirection.Output;
    cmd.ExecuteNonQuery();
    OracleLob tempLob = (OracleLob)cmd.Parameters[0].Value;
    MemoryStream MemStrm = new MemoryStream();
    XmlTextWriter writer = new XmlTextWriter(MemStrm, Encoding.UTF8);
    writer.Formatting = Formatting.Indented;
    WriteXMLExample(writer, "MSFT", 74.125, 5.89, 69020000);
    writer.Close();
    cmd.Parameters.Clear();
    cmd.CommandText = "test_xml";                    
    cmd.CommandType = CommandType.StoredProcedure;
    tempLob.Write(MemStrm.GetBuffer(), 0, MemStrm.GetBuffer().Length );
    tempLob.Position = 0;
    cmd.Parameters.Add(new OracleParameter("xml_inout", OracleType.Clob)).Value = (OracleLob) tempLob;
    cmd.ExecuteNonQuery();
    Console.WriteLine( "Param 0 = " + cmd.Parameters[0].Value.ToString() );
    tx.Commit();

    Hi,
    I'm working with C# and oracle database v8.1.7 (release 3), and i'm having some problems to fill correctly an oracle CLOB parameter with XML document using UTF8 encoding.
    It works fine with "Encoding.Unicode" but not with "Encoding.UTF8". The problem is that i can't use Unicode (UTF16) with oracle 8.
    Can someone help me ? Thanks.
    Here is my code.
    OracleTransaction tx = conn.BeginTransaction();
    OracleCommand cmd = conn.CreateCommand();
    cmd.Transaction = tx;
    cmd.CommandText = "declare xx clob; begin dbms_lob.createtemporary(xx, false, 0); :tempclob := xx; end;";
    cmd.Parameters.Add(new OracleParameter("tempclob", OracleType.Clob)).Direction = ParameterDirection.Output;
    cmd.ExecuteNonQuery();
    OracleLob tempLob = (OracleLob)cmd.Parameters[0].Value;
    MemoryStream MemStrm = new MemoryStream();
    XmlTextWriter writer = new XmlTextWriter(MemStrm, Encoding.UTF8);
    writer.Formatting = Formatting.Indented;
    WriteXMLExample(writer, "MSFT", 74.125, 5.89, 69020000);
    writer.Close();
    cmd.Parameters.Clear();
    cmd.CommandText = "test_xml";                    
    cmd.CommandType = CommandType.StoredProcedure;
    tempLob.Write(MemStrm.GetBuffer(), 0, MemStrm.GetBuffer().Length );
    tempLob.Position = 0;
    cmd.Parameters.Add(new OracleParameter("xml_inout", OracleType.Clob)).Value = (OracleLob) tempLob;
    cmd.ExecuteNonQuery();
    Console.WriteLine( "Param 0 = " + cmd.Parameters[0].Value.ToString() );
    tx.Commit();

  • How to parse this kind of XML documents and store in a relational tables

    Can u guys help me out ,..how to parse these kind of XML documents..like under PR there Sr,CreationDate and DoBID.. Again under Sr...there are LD, CID,TID, RID and so on.....
    so how to parse this kind of data..how to create the structure of the table....pls help me out..
    <nk8:PR>
              <nk8:Sr>
                   <nk8:LD>---------</nk8:LID>
                   <nk8:CID>---------</nk8:CID>
                   <nk8:TID>---------</nk8:TID>
                   <nk8:RID>---------</nk8:RID>
                   <nk8:CC>OnError</nk8:CC>
                   <nk8:AID>---------</nk8:AID>
              </nk8:Sr>
              <nk8:CreationDateTime>2002-07-01</nk8:CreationDateTime>
              <nk8:DOBID>---------</nk8:DOBID>
         </nk8:PR>
         <ssm:ER>
              <ssm:PN>---------</ssm:PN>
              <ssm:SN>---------</ssm:SN>
              <ssm:SCt>---------</ssm:SC>
              <ssm:IA>
                   <ssm:NT>---------</ssm:NT>
                   <nk8:LID>---------</nk8:LID>
                   <nk8:CID>---------</nk8:CID>
                   <ssm:AN>---------</ssm:AN>
              </ssm:A>
         </ssm:ER>
         </nk8:PR>

    First, your XML document is not well formatted. Once you're done with that you can extract the values and store it in a table column.
    sql> WITH xml_table AS
      2  (SELECT XMLTYPE(
      3  '
      4  <nk8:PR xmlns:nk8="http://www.w3.org">
      5  <nk8:Sr>
      6  <nk8:LID>LID Value</nk8:LID>
      7  <nk8:CID>CID Value</nk8:CID>
      8  <nk8:TID>TID Value</nk8:TID>
      9  <nk8:RID>RID Value</nk8:RID>
    10  <nk8:CC>OnError</nk8:CC>
    11  <nk8:AID>---------</nk8:AID>
    12  </nk8:Sr>
    13  </nk8:PR>') XMLCOL FROM DUAL)
    14  SELECT extractvalue(t.column_value,'//nk8:LID','xmlns:nk8="http://www.w3.org"') "LID",
    15   extractvalue(t.column_value,'//nk8:CID','xmlns:nk8="http://www.w3.org"') "CID",
    16   extractvalue(t.column_value,'//nk8:RID','xmlns:nk8="http://www.w3.org"') "RID",
    17  extractvalue(t.column_value,'//nk8:CC','xmlns:nk8="http://www.w3.org"') "CC"
    18  FROM xml_table, table(xmlsequence(extract(xmlcol,'/nk8:PR/nk8:Sr','xmlns:nk8="http://www.w3.org"'))) t;
    LID        CID        RID        CC
    LID Value  CID Value  RID Value  OnError

  • Read XML File Using PL/SQL

    Hi,
    I have to read a XML file using PL/SQL. I am new to this so please explain in easy steps.
    Regards,
    SF

    STEP - 2
    SQL>
    SQL> DECLARE
      2    l_ctx dbms_xmlsave.ctxType ;
      3    l_xml CLOB :=
      4  '<?xml version="1.0" encoding="UTF-8" ?>
      5  <NewDataSet>
      6      <ROW>
      7          <DEPARTMENT>BA52</DEPARTMENT>
      8          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
      9          <LOCATION>Australia</LOCATION>
    10          <MAY_2006>21668</MAY_2006>
    11      </ROW>
    12      <ROW>
    13          <DEPARTMENT>BA501</DEPARTMENT>
    14          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
    15          <LOCATION>China</LOCATION>
    16          <MAY_2006>8166</MAY_2006>
    17      </ROW>
    18      <ROW>
    19          <DEPARTMENT>BA522</DEPARTMENT>
    20          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
    21          <LOCATION>Australia</LOCATION>
    22          <MAY_2006>21668</MAY_2006>
    23      </ROW>
    24  </NewDataSet>' ;
    25  BEGIN
    26      l_ctx := dbms_xmlsave.newContext(targetTable => 'XML_INSERT');
    27      dbms_output.put_line(dbms_xmlsave.insertXML(ctxHdl => l_ctx,
    28                                                  xDoc   => l_xml) ||
    29                           ' rows inserted.');
    30      dbms_xmlsave.closeContext(l_ctx);
    31  END;
    32  /
    3 rows inserted.
    PL/SQL procedure successfully completed.Regards.
    Satyaki De.

  • Loading/breaking large files containing multiple XML documents using plsql

    Hi I have a requirement where in the client sends the multiple xml payloads/documents in a single text file. I need to load that into the xmltype varialbe. How to do this?
    I'm able to load the entire document into a clob object, here.. all the xml payloads are loaded into a single row. When I try to access this I get a error
    ORA-31001: Invalid resource handle or path name "/MobileInventoryResponse.dtd"
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    This error is due to the dtd present in the xml document : <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    But if I load the data into a clob after removing the doctype reference then I get the following error. Here to mulitple xml documents are loaded into a single clob row.
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00209: PI names starting with XML are reserved
    Error at line 81
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    When try to access this by using select xmltype(x) from t
    where x is column type of clob.
    Please let me know any method or type loading the multiple xml documents by using plsql. Only plsql method. There is a way by using SAX Loader. But can it be used in plsql or its a java method of loading.
    Regards,
    Naveen
    Edited by: MAN on Oct 18, 2008 9:21 PM

    sorry for that...
    There was enter character between some tags. From there I'm not receiving that particular error.
    Now what I get is
    ORA-31001: Invalid resource handle or path name "/MobileInventoryResponse.dtd"
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    ORA-06512: at line 39
    This is because there is a doctype at the start of the xml payload.
    But if there is no <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd"> this statement then it works fine.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    <MobileInventoryResponse>
    And this exercise I'm doing in my Windows xp loaded operating system with a local instance of oracle ... Do i need to do any other setting.
    Along with that I followed your method mentioned @ Re: LPX-00209: PI names starting with XML are reserved
    ignore:=dbms_xdb.createResource('/MobileInventoryResponse.dtd',bfilename('XML_DIR','MobileInventoryResponse.dtd'));
    And I'm not getting how it will refer the this resource.
    this above partilcular statement . should it be executed when ever we insert into the table ? But in the dtd there is no word saying "MobileInventoryResponse".
    got this error.
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00104: Warning: element "MobileInventoryResponse" is not declared in the DTD
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    ORA-06512: at line 21
    This is how I'm doing in the block
    DECLARE
    l_filehandle UTL_FILE.FILE_TYPE;
    l_filename VARCHAR2(50):='test.xml';
    l_rec_data VARCHAR2(500);
    l_rec_trim_data VARCHAR2(500);
    l_rec_trim_upper VARCHAR2(500);
    l_rec_full_data CLOB;
    ignore boolean;
    BEGIN
    l_filehandle := UTL_FILE.FOPEN('XML_DIR',l_filename,'R');
    --dbms_xdb.deleteResource('/MobileInventoryResponse.dtd',dbms_xdb.DELETE_RESOURCE   );
    LOOP
    ignore:=dbms_xdb.createResource('/MobileInventoryResponse.dtd',bfilename('XML_DIR','MobileInventoryResponse.dtd'));
    commit;
    UTL_FILE.GET_LINE(l_filehandle, l_rec_data);
    --dbms_output.put_line('l_rec_data : '|| l_rec_data);
    -- Trim the record to remove spaces
    l_rec_trim_data := TRIM(l_rec_data);
    l_rec_trim_upper := UPPER(l_rec_trim_data);
    l_rec_full_data := l_rec_full_data||l_rec_data;
    IF l_rec_trim_upper LIKE '</MOBILEINVENTORYRESPONSE>' THEN
    dbms_output.put_line('l_rec_full_data : '||l_rec_full_data);
    INSERT INTO library_xml VALUES(xmltype(l_rec_full_data));
    l_rec_full_data:=NULL;
    END IF;
    dbms_xdb.deleteResource('/MobileInventoryResponse.dtd',dbms_xdb.DELETE_RESOURCE );
    commit;
    END LOOP;
    UTL_FILE.FCLOSE(l_filehandle);
    COMMIT;
    --exception just for testing purpose
    EXCEPTION
    WHEN no_data_found THEN
    NULL;
    commit;
    END;
    Edited by: MAN on Oct 21, 2008 2:47 AM

  • How  to  send a  XML document using HTTPurlconnection as a  post

    Dear Guru's ,
    I am trying ot send a xml document to a httpserver
    using httpurl connection ..
    It works fine locally ..but over the net it is throwning an exception ..java.io.interupted exception ..
    any ideas .. please send me the code if possible
    Thanks in advance

    Are you opening the input stream or querying the reply headers after writing to the output stream? It's doing one or the other that actually triggers the send.

  • How to use java to create an XML document from an SQL database?

    Hi,
    I'm a complete novice at XML and have only recently started programming in Java.
    I'm currently trying to develop a package in Java 1.1.8 which requires a set of very specifically formatted XML documents. These documents would need to be updated regularly by people with no knowledge of Java and I would like to make it as simple as possible.
    Since the data will already be in an SQL database, I thought it might be possible to generate the XML documents from the data using a small Java application, but I'm not too sure how to go about this or if this is even possible! Any help or pointers in the right direction would be very much appreciated.
    Louise

    Do you have the option of upgrading to a newer version of the JDK?
    JAXB does what you are wanting very easily. Also there are tools if you don't want to write your own. JAXB is available as early release on Sun's site as is the newest JDK. Otherwise, you have to design a factory and interface that will do this for you (which is what JAXB basically is in a very simplified view).

  • Validating an XML document using external DTD?

    Hi,
    I want to validate an XML file using external DTD with SAX parser.
    How can I validate an XML file with external DTD.
    Thanks in Advance,
    Mahendra

    I dont think we can set a DTD file throug java while
    parsing an XML.I've done it with an XML schema though. Can you use that instead? For schemas you do something like:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setAttribute( "http://java.sun.com/xml/jaxp/properties/schemaSource",
                                       schemaUrl );where schemaUrl in this case would be something like file:///usr/local/whatever.xsd

  • Generic Populating the XML document using Java Class Generator and Reflection

    I am looking for a generic source code in order to convert the data parsed from any tabular text form ( tab delimited for example that maps certain XML Schema created form Database Schema for Oracle.
    I know it is possible to generate XML DTD or XSD from Oracle database table schema by XSU utility from XDK. And also it is possible to create Java source files from an XML DTD or XSD by using XML Clas Generator.
    I believe there must be some generic code that parses tabular text data and converts them to XML format using above mentioned generated Java source files and may be Java reflection mechanism.
    If anyone has any tool or knows any free ware that helps me, I would like to know about it, and I would really appreciate it.

    1. Read the XML file into a DMO object, walk the DOM to find the list, insert your new entry as a child, write the DOM back to a file.
    2. If the XML is not in a file, but in a string, then you can do the same with string input and output.

  • Merging XML documents using DOM

    I have 300 XML documents to merge. They contain structures such as:
    1.xml=
    <MIM>
    <MIM-ENTRY>
    <MIM-NUMBER>123456
    </MIM-NUMBER>
    </MIM-ENTRY>
    </MIM>
    2.xml =
    <Mim>
    -<Mim-entry>
    <Mim-title>*604176 SUPPRESSOR OF CYTOKINE SIGNALING 3</Mim-title>
    </Mim-entry>
    </Mim>
    3.xml=
    <Mim>
    <Mim-entry>
    <Mim-alternative_titles_and_symbols>
    <Mim-alternative_titles_and_symbols-alt>SOCS3</Mim-alternative_titles_and_symbols-alt>
    </Mim-alternative_titles_and_symbols>
    </Mim-entry>
    </Mim>
    all the XML files have this sort of structure.
    Essentailly, I need to merge them (using the above as an example) to get:
    <MIM>
    <MIM-ENTRY>
    <MIM-NUMBER>123456</MIM-NUMBER>
    <Mim-title>*604176 SUPPRESSOR OF CYTOKINE SIGNALING 3</Mim-title>
    <Mim-alternative_titles_and_symbols>
    <Mim-alternative_titles_and_symbols-alt>SOCS3</Mim-alternative_titles_and_symbols-alt>
    </Mim-alternative_titles_and_symbols>
    </Mim-entry>
    </MIM>
    I have all the trees stored in a Vector as DOM objects.
    Anyone have any ideas how to merge these documents as stated?
    Any help would be most appriciated

    Ah, think im begining to get you. And if I am undertstanding you correctly it might not solve my problem.
    Ok, so the files exist as follows:
    file1.xml
    <MIN>
    <MIM-1>
    <MIM-2>something
    </MIM-2>
    </MIM-1>
    </MIM>
    file2.xml
    <MIN>
    <MIM-1>
    <MIM-3>somethingelse
    </MIM-3>
    </MIM-1>
    </MIM>
    merged to give:
    <MIN>
    <MIM-1>
    <MIM-2>something
    </MIM-2>
    <MIM-3>somethingelse
    </MIM-3>
    </MIM-1>
    </MIM>
    SO....
    I have to bring out the nodes <MIM-2> from file1.xml and import them. in file2 appendChild will be applied to <MIM1> using those nodes.
    This is really not what i was looking for.
    I wanted to throw everything together. Reason? I will be merging over 300 xml documents all of which will be inserting elements at different depths. This method you describe (i think) will need the specific nodes to be extracted from each and every DOM structure. This might not be possible as the XML stuctures will change depend on the program circumstances.
    I would like to just to put all the DOMS together and Tags of the same name will simply merge. to give the output above.
    Or does method you descibed this actually do this?
    I apologise for my stupidity in advance.
    litkid

  • Writing XML document using form values

    Being new to java/xml I'm strugling with this task:
    I have a web form and I need to pass the values from the form to a class that will then create an xml file using the form values.
    I've looked through the JAXP tutorial and Sun's XML tutorial but can't find anything that would suit my needs.
    Could anyone help me on how I should go about doing this?
    Does anyone have any sample code?

    with JAXP, you can either :
    - build a new XML document from scratch, using DOM, and append each node, each value,
    - create a style sheet that generates an XML document, receiving the web form values as parameters, processed with XSLT.

  • How to use OAF transform sotred xml documents using XSLT...

    Does anyone have any experience using XSLT in OAF? Specifically, I have xml documents stored in a clob to which I wish to apply an XSLT transformation and then store the transformed documents back into the clob. Is there a way to apply an XSLT transformation using say BI-Publisher via OAF?

    "XML DIFF" are the keywords you can use to search for products that do this. Last time I looked there was a lot of XML Diff implementations, but none of them produced human-readable output that I really liked. I expect that's because XML diff is an easy thing for people to ask for but not an easy thing to do, given the considerable number of ways there are to change a document.

  • How to append child to XML document using Java

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
         <bean name="PinnacleReportsData"
              class="com.hsbc.webapp.report.view.GenericPinnacleReportsViewData"
              singleton="false">
              <property name="headers">
                   <value>Account|Cusip|Description|SecType|Sector|Holding|Price|MarketValue|SettleDate|Yield|SprdUST|AL|CFDur|OAS|ZVolOas|OADur|PrepayDur|VolDur|DV01|DVOAS01|KRDur10Y|PrepayModelCalled|CalcError|CalculationTime</value>
              </property>     
              <property name="noOfRows">
                   <value>20</value>
              </property>     
              <property name="rowdata">
                   <list>
                        <value>AA09b|CMO|8000|8000|62052MAD0|MFPLC_4A 2A 144A||8097|99-27+|5.18|0.25|200|0.00||15||||</value>
                        <value>AA09b|CMO|10000|10000|320277AD8|HASCO 2005 F II-A-2||9958|99-13|5.69|0.13|131|0.02||154|0.000|25|0.001|9864</value>
                        <value>AA09b|CMO|8000|2363|46071LAA8|IMT_03-3G A2||2378|100-01|5.18|0.14|33|0.00||2||||</value>
                        <value>AA09b|CMO|1270|312|40430HDW5|HASCO 2006-O II-A-1||309|99-00|8.98|0.16|5|0.01||3|0.000|1|0.001|296</value>
                        <value>AA09b|CMO|5000|5000|40430HFQ6|HASCO 2006-O M-3||4583|91-15+|8.99|1.16|534|-0.58|-2|-2644|0.016|712|0.080|367625</value>
                        <value>AA74b|ABS|8000|8000|62052MAD0|MFPLC_4A 2A 144A||8097|99-27+|5.18|0.25|200|0.00||15||||</value>
                        <value>AA74b|ABS|10000|10000|320277AD8|HASCO 2005 F II-A-2||9958|99-13|5.69|0.13|131|0.02||154|0.000|25|0.001|9864</value>
                        <value>AA74b|ABS|8000|2363|46071LAA8|IMT_03-3G A2||2378|100-01|5.18|0.14|33|0.00||2||||</value>
                        <value>AA74b|ABS|1270|312|40430HDW5|HASCO 2006-O II-A-1||309|99-00|8.98|0.16|5|0.01||3|0.000|1|0.001|296</value>
                        <value>AA74b|ABS|5000|5000|40430HFQ6|HASCO 2006-O M-3||4583|91-15+|8.99|1.16|534|-0.58|-2|-2644|0.016|712|0.080|367625</value>
                   </list>
              </property>
         </bean>
    </beans>               hi there i have a XML Document above,and i need to append values to the <list> using java.
    i have string values like
         <value>AA74b|ABS|5000|5000|40430HFQ6|HASCO 2006-O M-3||4583|91-15+|8.99|1.16|534|-0.58|-2|-2644|0.016|712|0.080|367625</value>to add, but failing to navigate to the <list>
    any help?

    1. Read the XML file into a DMO object, walk the DOM to find the list, insert your new entry as a child, write the DOM back to a file.
    2. If the XML is not in a file, but in a string, then you can do the same with string input and output.

Maybe you are looking for

  • I need to set the position of components on a page that contains a MenuBar,

    I need to set the position of components on a page that contains a MenuBar, but MenuBar does not provide a getPreferred size method. How can I get the MenuBar's size in AWT? Thanks.

  • Master-Detail Navigation Behavior Problem

    Hello, I am having problem in navigating from Master to Detail. Scenaio: Master1 ---> Master2 ---> Detail Problem and Requirement I navigate to Master2 from Master1 properly. When I click list item of Master2 and navigate to Detail, my master page au

  • Weird javascript problem with IE

    on this page: http://www.webtrans1.com/folio when you click on a thumbnail on the left, the background around the thumbnail should switch to grey. So that whichever thumbnail is selected has a grey background, while the others have a white background

  • Logging for a specific ACL line

    Hello, I'm currently evaluating rules on ASA. There are some rules applied, but some of the traffic does not match those rules. I created a rule allowing everything and I need to see what traffic is hitting this especific rule on line 3. Example: acc

  • Help with fm BAPI_ACC_DOCUMENT_POST

    Hello! Would like to request for some help with BAPI's, since it is my first time to use them.  The programming requirement is to create an uploading utility to post the beginning balances of vendor and customer.  I was recommended to use the fm BAPI