XML Document Generation

Dear All
I have a requirement to generate xml document from database as per given XML schema definition. I did this by using oracle report developer to generate out put as xml document.
My question is that is there any sequence important for attribute for example
XSD has attribute
Name
Address
phoneno
But When i generate xml document using oracle report developer it changes the sequence of attributes like this
phoneno
address
name
please guide that this wrong sequence of attribute have any problem when validating xml document with xsd.
Regards

XML 1.0 specifications :
http://www.w3.org/TR/REC-xml/#sec-starttags
The Name in the start- and end-tags gives the element's type. [Definition: The Name-AttValue pairs are referred to as the attribute specifications of the element], [Definition: with the Name in each pair referred to as the attribute name ] and [Definition: the content of the AttValue (the text between the ' or " delimiters) as the attribute value.] Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

Similar Messages

  • ABAP XML Document generation

    Hi All,
    I am using DOM Api for generating an xml document in Abap.
    I am facing problems while generating a CDATA section in my xml file.Can anyone please provide me a sample code for generating a CDATA section using the IF_XML_DOCUMENT interface in ABAP.
    Thanks,
    Yomesh

    HI raja,
    The interface is actually IF_IXML.
    Created an instance of cl_ixml class.
    I have initialized as below
    initialize iXML
        type-pools: ixml.
        class cl_ixml definition load.
        data irc type i.
    create main factory
        data: ixmlfactory type ref to if_ixml.
        ixmlfactory = cl_ixml=>create( ).
    create stream factory
        data: streamfactory type ref to if_ixml_stream_factory.
        streamfactory = ixmlfactory->create_stream_factory( ).
    Any help appreciated.
    thanks,
    Yomesh

  • Generation of xml document of rows in table.

    hi..
    i want to generate xml document for one table.....i want all records from that table to xml...
    thank u
    sam

    create table test(col1 varchar2(10));
    insert into test values('hello1');
    insert into test values('hello2');
    insert into test values('hello3');
    insert into test values('hello4');
    commit;
    set serveroutput on;
    declare
    v_sql varchar2(1000);
    v_output clob;
    begin
    v_sql := 'select * from test';
    v_output := dbms_xmlgen.getxml(v_sql);
    dbms_output.put_line(v_output);
    end;
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <COL1>hello1</COL1>
    </ROW>
    <ROW>
    <COL1>hello2</COL1>
    </ROW>
    <ROW>
    <COL1>hello3</COL1>
    </ROW>
    <ROW>
    <COL1>hello4</COL1>
    </ROW>
    </ROWSET>
    The dbms_xmlgen can do it for you like the above example.
    Lee
    null

  • Problem in digitally signing a particular element of an XML Document

    hi all!!
    I was trying to sign a particular element of an XML document using JSR105 (XML Digital Signatures) API.
    For which i used +#xpointer(id('idvalue'))+ and +#idvalue+ as the URI for the reference i create as below :
    Reference ref = fac.newReference("#xpointer(id('123')) ", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform(Transform.ENVELOPED,(TransformParameterSpec) null)), null, null);
    NOTE: Here 123 is the value of the attribute 'id' of the element i wish to sign in the input XML document.
    But when i try to digest and sign the the above created reference, i get the following exception (which is strange! atleast for me!)
    Exception in thread "main" javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: Can't resolve ID: '123' in ''
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.calculateDigestValue(ReferenceImpl.java:327)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.sign(ReferenceImpl.java:237)
    at com.ibm.xml.crypto.dsig.dom.XMLSignatureImpl.sign(XMLSignatureImpl.java:158)
    at sent.Generate.main(Generate.java:103)
    Caused by: javax.xml.crypto.URIReferenceException: Can't resolve ID: '123' in ''
    at com.ibm.xml.crypto.dsig.dom.URIDereferencerImpl.dereference(URIDereferencerImpl.java:193)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.calculateDigestValue(ReferenceImpl.java:285)
    +... 3 more+
    javax.xml.crypto.URIReferenceException: Can't resolve ID: '123' in ''
    at com.ibm.xml.crypto.dsig.dom.URIDereferencerImpl.dereference(URIDereferencerImpl.java:193)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.calculateDigestValue(ReferenceImpl.java:285)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.sign(ReferenceImpl.java:237)
    at com.ibm.xml.crypto.dsig.dom.XMLSignatureImpl.sign(XMLSignatureImpl.java:158)
    at sent.Generate.main(Generate.java:103)
    I've given the whole Java code i used to generate the signature and the XML i used below for you to get a clear picture of what i tried...
    Any suggestions are very much welcome..
    thanks..
    ragu
    Generate.java
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.security.InvalidAlgorithmParameterException;
    import java.security.KeyException;
    import java.security.KeyPair;
    import java.security.KeyPairGenerator;
    import java.security.NoSuchAlgorithmException;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    import javax.xml.crypto.MarshalException;
    import javax.xml.crypto.dsig.CanonicalizationMethod;
    import javax.xml.crypto.dsig.DigestMethod;
    import javax.xml.crypto.dsig.Reference;
    import javax.xml.crypto.dsig.SignatureMethod;
    import javax.xml.crypto.dsig.SignedInfo;
    import javax.xml.crypto.dsig.Transform;
    import javax.xml.crypto.dsig.XMLSignature;
    import javax.xml.crypto.dsig.XMLSignatureException;
    import javax.xml.crypto.dsig.XMLSignatureFactory;
    import javax.xml.crypto.dsig.dom.DOMSignContext;
    import javax.xml.crypto.dsig.keyinfo.KeyInfo;
    import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory;
    import javax.xml.crypto.dsig.keyinfo.KeyValue;
    import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
    import javax.xml.crypto.dsig.spec.TransformParameterSpec;
    import javax.xml.crypto.dsig.spec.XPathFilterParameterSpec;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    public class Generate {
          * @param args
          * @throws NoSuchAlgorithmException
          * @throws InvalidAlgorithmParameterException
          * @throws KeyException
          * @throws ParserConfigurationException
          * @throws IOException
          * @throws SAXException
          * @throws FileNotFoundException
          * @throws XMLSignatureException
          * @throws MarshalException
          * @throws TransformerException
         public static void main(String[] args) throws NoSuchAlgorithmException,
                   InvalidAlgorithmParameterException, KeyException,
                   FileNotFoundException, SAXException, IOException,
                   ParserConfigurationException, MarshalException,
                   XMLSignatureException, TransformerException {
              java.security.Security
                        .addProvider(new com.ibm.xml.crypto.IBMXMLCryptoProvider());
              XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM",
                        new com.ibm.xml.crypto.IBMXMLCryptoProvider());
              //reference generation
              //its here where I point the URI to the element i want to digest
              Reference ref = fac.newReference("#xpointer(id('123'))", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform(Transform.ENVELOPED,(TransformParameterSpec) null)), null, null);
              //signedinfo element generation
              SignedInfo si = fac
                        .newSignedInfo(fac.newCanonicalizationMethod(
                                  CanonicalizationMethod.INCLUSIVE,
                                  (C14NMethodParameterSpec) null), fac
                                  .newSignatureMethod(SignatureMethod.RSA_SHA1, null),
                                  Collections.singletonList(ref));
              KeyInfoFactory kif = fac.getKeyInfoFactory();
              //Create a DSA KeyPair
              KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
              kpg.initialize(512);
              KeyPair kp = kpg.generateKeyPair();
              KeyValue kv = kif.newKeyValue(kp.getPublic());
              // Create a KeyInfo and add the KeyValue to it
              KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv));
              // Instantiate the document to be signed
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              dbf.setNamespaceAware(true);
              Document doc = dbf.newDocumentBuilder().parse(
                        new FileInputStream(new File("shippedPedigree.xml")));
              // Create a DOMSignContext and specify the DSA PrivateKey and
              // location of the resulting XMLSignature's parent element
              DOMSignContext dsc = new DOMSignContext(kp.getPrivate(), doc
                        .getDocumentElement());
              //Create the XMLSignature (but don't sign it yet)
              XMLSignature signature = fac.newXMLSignature(si, ki);
              // Marshal, generate (and sign) the enveloped signature
              signature.sign(dsc);
              //writing the signed document back to the file
              OutputStream os;
              os = new FileOutputStream(new File("shippedpedigree.xml"));
              TransformerFactory tf = TransformerFactory.newInstance();
              Transformer trans = tf.newTransformer();
              trans.transform(new DOMSource(doc), new StreamResult(os));
    the "shippedPedigree.xml" i used to sign:
    <?xml version="1.0" encoding="UTF-8"?>
    <ped:pedigree xmlns:ped="urn:epcGlobal:Pedigree:xsd:1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ped:shippedPedigree id="123">
    <ped:documentInfo>
    <ped:serialNumber>2233</ped:serialNumber>
    <ped:version>ped:version</ped:version>
    </ped:documentInfo>
    <ped:signatureInfo>
    <ped:signerInfo>
    <ped:name>Joe Doe</ped:name>
    <ped:title>Manager</ped:title>
    <ped:telephone>800-521-6010</ped:telephone>
    <ped:email>[email protected]</ped:email>
    <ped:url>www.kittinginc.com</ped:url>
    </ped:signerInfo>
    <ped:signatureDate>2001-12-31T12:00:00</ped:signatureDate>
    <ped:signatureMeaning>Certified</ped:signatureMeaning>
    </ped:signatureInfo>
    <ped:itemInfo>
         <ped:lot>123</ped:lot></ped:itemInfo>
    </ped:shippedPedigree></ped:pedigree>
    ------------------------------------------------------------------------

    Sabarisri N wrote:
    Hi All,
    my xml is like below.
    <ns1:abcd>
    <ns2:a>1</ns2:a>
    <ns2:b>2</ns2:b>
    </ns1:abcd>
    If i try retrieving the value of the root element of this xml document,
    Node myroot=doc.getDocumentElement();
    String result=myroot.getNodeName();
    My output is ns1:abcd .. i want only "abcd"...
    The parser is returning the correct rootNodeName i.e ns1:abcd. rootNodeName always goes with the given input and returns the root element as is.
    >
    My xml will not always have same namespaces.. from the incoming xml i should first check, for the namespaces..Please give me some idea.
    I guess.. I need some namespace evaluation to be set..
    Refer below link it'll give idea of identifying XML-NAMESPACE-PREFIX
    http://java.sun.com/developer/Books/xmljava/ch03.pdf
    http://download.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html
    Please help me in this regard.
    Thanks,
    Sabarisri. N

  • Invalid testsuite XML document for junitreport task

    Hi everyone, I'm new to this forum and apologies if this is the incorrect place for me to post this thread. Basically I'm having some issues with the junitreport task with my junit test project.
    I have a dummy class called Money and dummy test suite called MoneyTest that contains 4 test cases. The test is run through ANT <junit> task and they all passed with no problems. The problem occurred when I tried to perform the automatic test report generation using <junitreport> task, and the generated HTML pages contain no test results at all, indicated by "Tests:0 Failures:0 Errors:0 Success rate:0 Time:0.000" (in which case it should be 4 for Tests, etc.).
    The error message says "TESTS-TestSuites.xml is not a valid testsuite XML document". I assume this file is auto-generated by the <junitreport> task which defines how the output HTML should look like. However, it only contains the folloing 2 lines:<?xml version="1.0"?> <testsuites />. I suspect this should be the cause of the empty output. So could anyone who's familar with this issue shed any light on how I should go about deal with this issue please? Thank you very much in advance!
    By the way, the task code in build.xml for reporting is as follows:
    <target name="report">
         <junitreport todir="./reports">
              <fileset dir="./reports" includes="*.xml" />
              <report format="frames" todir="./report/html" />
         </junitreport>
    </target>

    Thanks, the issue has been solved. I simply forgot to set the formatter type to xml in the junit task.

  • Generate XML document

    Hi,
    My problem is about generating XML document. I'd like to be able to generate automaticaly (like what we can get at this kind of URL http://xdbserver:8080/oradb/USER/table_name) XML documents for any relational tables, I want the document being schema based and I want to store them in XDB in the repository.
    I do not really matter at the time the way the xml is generated (I just do not want that it takes hours). Is there a way to do that with PL/SQL package or with a java classes?
    Thanks in advance.
    Vlad

    1)I'm using this PL/SQL proc to create XML :
    (table_name in VARCHAR2)as --generation d'un fichier xml basé sur un schéma pour la table dont le nom est passé en paramètre
    qryCtx DBMS_XMLGEN.ctxHandle;
    result XMLType;
    begin
    qryCtx := dbms_xmlgen.newContext('SELECT * from VLAD.' || table_name);
    -- set the row header to be EMPLOYEE
    DBMS_XMLGEN.setRowTag(qryCtx, table_name);
    -- now get the result
    result := DBMS_XMLGEN.getXMLType(qryCtx,2); --2 for XMLSchema (1 for a DTD)
    --insertion de result dans la table tempo
    insert into tempo values(result);
    --close context
    DBMS_XMLGEN.closeContext(qryCtx);
    exception
    when others then
    dbms_output.put_line(TO_CHAR(sqlerrm));
    end;
    I saw in the doc that DBMS_XMLGEN.getXMLType(qryCtx,2) with the "2" was for schema but what does it do exactly, does it generate a schema against the table_name?
    2)I'd like to put the result which is XMLType in a XML file in the server, is there a way to do it with UTL FILE?
    Vlad

  • XML document must have a top level element

    Hi all,
    I have deployed my web services in 904. When I try to see the generated wsdl, I am seeing:
    XML document must have a top level element.
    in IE. Does anyone know why?
    Thanks.

    If you take a look under the location where the application was deployed, you should find a file with the name of your interface (or class) and the extension .wsdl.
    If there is already a file of that name, we do not try to re-generate it. If this file is not a valid XML file, then it will explain the error message you are seing.
    Another reason for this error is when the code generation fail silently. It can occurs in some rare case, when you have started oc4j using a JRE instead of JDK (without javac).
    Hope this helps,
    Eric

  • 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

  • Problem replacing Null nodes with real values in XML documents...

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    Our friends in Java land are insisting on passing data between Java and PL/SQL using fairly small XML documents (don't ask). I then need to extract the input parameter values and pass them, on to the stored procedures that actually do the work. These return a result which needs to be returned to the java layer in the output XML document.
    Here is a cut down version of the input XML...
    <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    <Result xsi:nil="true"/>
    </Parameter>
    <Parameter>
    <Id>2</Id>
    <Result xsi:nil="true"/>
    </Parameter>
    </ParameterList>
    and this is an example of what I am expected to return...
    <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    *<Result>SUCCESS</Result>*
    </Parameter>
    <Parameter>
    <Id>2</Id>
    *<Result>WARNING</Result>*
    </Parameter>
    </ParameterList>
    i.e. I am expected to replace the value of the Result node with a string indicating the succes or otherwise of the underlying PL/SQL process.
    I am extracting the input values using the DBMS_XMLDOM functions and naively assumed that DBMS_XMLDOM.SETNODEVALUE could be used to update the value in the Result node - It didn't work so I resorted to reading the documentation which revealed that it will not work for a null node.
    Am I going to have to use XSLT to generate the output XML from the Input and incorprate the result? Or is there a simpler way?
    I have used XSLT in Oracle before and still have the nervous tick...

    Thanks A Non,
    With your suggestion and a bit of help from the w3schools.com xml dom tutorial I eventually managed to work out how to do this.
    Here is the code (with all my debug stuff in so it looks worse than it is...)
    create or replace
    PROCEDURE ExtractXMLValues (p_inXml IN CLOB ) IS
    l_string VARCHAR2(4000);
    l_value VARCHAR2(4000);
    l_DOM_doc dbms_xmldom.DOMDocument;
    l_DOM_node dbms_xmldom.DOMNode;
    l_new_DOM_node dbms_xmldom.DOMNode;
    l_new_element dbms_xmldom.DOMElement;
    l_new_DOM_nodevalue dbms_xmldom.DOMNode;
    l_value_Node dbms_xmldom.DOMNode;
    l_parameter_Node dbms_xmldom.DOMNode;
    --l_DOM_nodelist    dbms_xmldom.DOMNodeList;
    l_Result_DOM_node dbms_xmldom.DOMNode;
    BEGIN
    l_DOM_doc := dbms_xmldom.newDomDocument(p_inXml);
    l_DOM_node := dbms_xmldom.makeNode(l_DOM_doc);
    dbms_xmldom.writeToBuffer(l_DOM_node, l_string);
    dbms_output.put_line('1 ' || l_string);
    l_parameter_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Parameter');
    -- get the current values in the XML document for Id and Result
    l_Result_DOM_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Id');
    l_value_Node := dbms_xmldom.getFirstChild(l_Result_DOM_node);
    l_value := dbms_xmldom.getnodevalue(l_value_Node);
    dbms_xmldom.writeToBuffer(l_Result_DOM_node, l_string);
    dbms_output.put_line('2 ' || l_string || ' : ' || l_value);
    l_Result_DOM_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Result');
    l_value_Node := dbms_xmldom.getFirstChild(l_Result_DOM_node);
    l_value := dbms_xmldom.getnodevalue(l_value_Node);
    dbms_xmldom.writeToBuffer(l_Result_DOM_node, l_string);
    dbms_output.put_line('3 ' || l_string || ' : ' || l_value);
    -- create new Result node
    l_new_DOM_node      := dbms_xmldom.makenode(dbms_xmldom.createElement(l_DOM_doc, 'Result'));
    dbms_xmldom.writeToBuffer(l_new_DOM_node, l_string);
    dbms_output.put_line('4 New node : ' || l_string);
    -- create a value for it
    l_new_DOM_nodevalue := dbms_xmldom.makenode(dbms_xmldom.createtextnode(l_DOM_doc, 'SUCCESS'));
    dbms_xmldom.writeToBuffer(l_new_DOM_nodevalue, l_string);
    dbms_output.put_line('5 New node value : ' || l_string);
    -- add the value to the new Result node
    l_new_DOM_nodevalue := dbms_xmldom.appendchild(l_new_DOM_node,  l_new_DOM_nodevalue);
    dbms_xmldom.writeToBuffer(l_new_DOM_node, l_string);
    dbms_output.put_line('6 New node : ' || l_string);
    -- replace the old node with the new one
    l_Result_DOM_node := dbms_xmldom.replaceChild(l_parameter_node, l_new_DOM_node, l_Result_DOM_node);
    dbms_xmldom.writeToBuffer(l_parameter_node, l_string);
    dbms_output.put_line('6 parameter node : ' || l_string);
    dbms_xmldom.writeToBuffer(l_DOM_node, l_string);
    dbms_output.put_line('7 Updated document ' || l_string);
    dbms_xmldom.freeDocument(l_DOM_doc);
    END ExtractXMLValues;
    and the output...
    1 <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    <Result xsi:nil="true"/>
    </Parameter>
    </ParameterList>
    2 <Id>1</Id> : 1
    3 <Result xsi:nil="true"/> :
    4 New node : <Result/>
    5 New node value : SUCCESS
    6 New node : <Result>SUCCESS</Result>
    6 parameter node : <Parameter>
    <Id>1</Id>
    <Result>SUCCESS</Result>
    </Parameter>
    7 Updated document <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Parameter>
    <Id>1</Id>
    *<Result>SUCCESS</Result>*
    </Parameter>
    </ParameterList>
    One question, why do the dbms_xmldom functions return the Old value? I was expecting the returned value to be the updated node.
    Edited by: Lone voice on May 14, 2009 11:24 AM

  • Performance issues with FDK in large XML documents

    In my current project with FrameMaker 8 I'm experiencing severe performance issues with some FDK API calls.
    The documents are about 3-8 MBytes in size. Fortmatted they cover 150-250 pages.
    When importing such an XML document I do some extensive "post-processing" using FDK. This processing happens in Sr_EventHandler() during the SR_EVT_END_READER event. I noticed that some FDK functions calls which modify the document's structure, like F_ApiSetAttribute() or F_ApiNewElementInHierarchy(), take several seconds, for the larger documents even minutes, to complete one single function call. I tried to move some of these calls to earlier events, mostly to SR_EVT_END_ELEM. There the calls work without a delay. Unfortunately I can't rewrite the FDK client to move all the calls that are lagging to earlier events.
    Does anybody have a clue why such delays happen, and possibly can make a suggestion, how to solve this issue? Thank you in advance.
    PS: I already thought of splitting such a document in smaller pieces by using the FrameMaker book function. But I don't think, the structure of the documents will permit such an automatic split, and it definitely isn't an option to change the document structure (the project is about migrating documents from Interleaf to XML with the constraint of keeping the document layout identical).

    FP_ApplyFormatRules sounds really good--I'll give it a try on Monday. Wonder how I could miss it, as I already tried FP_Reformatting and FP_Displaying at no avail?! By the way, what is actually meant with FP_Reformatting (when I used it I assumed it would do exactly what FP_ApplyFormatRules sounds to do), or is that one another of Lynne's well-kept secrets?
    Thank's for all the helpful suggestions, guys. On Friday I already had my first improvements in a test version of my client: I did some (not all necessary) structural changes using XSLT pre-processing, and processing went down from 8 hours(!) to 1 hour--Yeappie! I was also playing with the idea of writing a wrapper to F_ApiNewElementInHierarchy() which actually pastes an appropriate element created in a small flow on the reference pages at the intended insertion location. But now, with FP_ApplyFormatRules on the horizon, I'm quite confident to get even the complicated stuff under control, which cannot be handled by the XSLT pre-processing, as it is based on the actual formatting of the document at run-time and cannot be anticipated in pre-processing.
    --Franz

  • Parse and output XML document while preserving attribute order

    QUESTION: How can I take in an element with attributes from an XML and output the same element and attributes while preserving the order of those attributes?
    The following code will parse and XML document and generate (practically) unchanged output. However, all attributes are ordered a-z
    Example: The following element
    <work_item_type work_item_db_site="0000000000000000" work_item_db_id="0" work_item_type_code="3" user_tag_ident="Step" name="Work Step" gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_site="0000000000000000" last_upd_db_id="0" rstat_type_code="1">
    </work_item_type>is output as:
    <work_item_type gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_id="0" last_upd_db_site="0000000000000000" name="Work Step" rstat_type_code="1" user_tag_ident="Step" work_item_db_id="0" work_item_db_site="0000000000000000" work_item_type_code="3">
    </work_item_type>As you may notice, there is no difference in these besides order of the attributes!
    I am convened that the problem is not in the stylesheet.xslt but if you are not then it is posted bellow.
    Please, someone help me out with this! I have a feeling the solution is simple
    The following take the XML from source.xml and outputs it to DEST_filename with attributes in a-z order
    Code:
    private void OutputFile(String DEST_filename, String style_filename){
         //StreamSource stylesheet = new StreamSource(style_filename);
         try{
              File dest_file = new File(DEST_filename);
              if(!dest_file.exists())
                  dest_file.createNewFile();
              TransformerFactory tranFactory = TransformerFactory.newInstance();
              Transformer aTransformer = tranFactory.newTransformer();
              aTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
              Source src = new DOMSource("source.xml");
              Result dest = new StreamResult(dest_file);
              aTransformer.transform(src, dest);
              System.out.println("Finished");
         catch(Exception e){
              System.err.print(e);
              System.exit(-1);
        }

    You can't. The reason is, the XML Recommendation explicitly says the order of attributes is not significant. Therefore conforming XML serializers won't treat it as if it were significant.
    If you have an environment where you think that the order of attributes is significant, your first step should be to reconsider. Possibly it isn't really significant and you are over-reaching in some way. Or possibly someone writing requirements is ignorant of this fact and the requirement can be discarded.
    Or possibly your output is being given to somebody else who has a defective parser which expects the attributes to be in a particular order. You could quote the XML Recommendation to those people but often XML bozos are resistant to change. If you're stuck writing for that parser then you'll have to apply some non-XML processing to your output to fix it up on their behalf.

  • Display xml documents - how to submit a feature request?

    Safari is useless when it comes to render raw xml documents. You have to view the actual source to see the xml.
    Is there an official way to submit a feature request for safari to apple? I would love to see something similar to what firefox does with xml. Safari is such a fast and nice browser, if it only could handle text/xml better...

    As you said Safari simply shows all xml element content concatenated together. But no tags or attribute values. If the ContentType in the http header is set to text/xml Firefox shows an xml tree that you can nicely browse. I think IE5+ and Opera do that too. It is important to set the right content type though. Here is an example that shows nice in FF, but is unreadable in Safari:
    http://ww3.bgbm.org/biocase/pywrapper.cgi?dsa=Herbar
    Sure you can look at the source code, but the xml might not be pretty printed.

  • Displaying XML Document in new browser window

    Hi,
    I have a hyperlink on my page. When I click on it, it will open a new IE window and display xml document.
    The new window is displaying some of the xml and at the end displaying the following:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    End element was missing the character '>'. Error processing resource 'http://localhost:28080/benchmark/faces/displayXMLDocu...
    However, I cut and paste the xml String where I write it to the HTTPServletResponse to XMLSPY and it displays correctly.
    Please let me know.
    Rgrds

    Here are the steps:
    1. I created page1 that has a hyperlink.
    2. Hyperlink property are set to display page2 in a new window. (popup).
    3. page2.prerender() method, I set the response to the following:
    public void prerender() {
    javax.faces.context.ExternalContext ec = this.getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ec.getResponse();
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.setHeader("Cache-Control","must-revalidate");
    response.setHeader("Cache-Control","max-age=0");
    response.setHeader("Pragma","no-cache");
    response.setHeader("Expires","0");
    response.setContentType("text/xml");
    response.setBufferSize(5000);
    String xmlString = getRequestBean1().getBookingPnrDetailsXML();
    try{
    xmlString="<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><test1>this is a test</test1><victor>Hello Victor</victor></root>";
    PrintWriter out = new PrintWriter(response.getOutputStream());
    log(xmlString);
    out.print(xmlString);
    }catch(IOException io){
    System.out.println("" + io.getMessage());
    io.printStackTrace();
    4.page2.jsp code is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/xml;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view/>
    <ui:page binding="#{displayXMLDocument.page1}" id="page1"/>
    <ui:html binding="#{displayXMLDocument.html1}" id="html1"/>
    <ui:head binding="#{displayXMLDocument.head1}" id="head1"/>
    <ui:link binding="#{displayXMLDocument.link1}" id="link1"/>
    <ui:body binding="#{displayXMLDocument.body1}" id="body1"/>
    <ui:form binding="#{displayXMLDocument.form1}" id="form1"/>
    </jsp:root>
    please let me know.
    Rgrds.

  • Document Generation Wizard - disregard picked Items for Delivery Notes

    Hi,
    We have a requirement from a customer whereby when they are creating Delivery Notes from Sales Orders via the Document Generation Wizard to exclude quantities of Items which have been picked on the Sales Order already. 
    E.g. Sales Order, Product XXXX for Qty 10.
    Qty 5 has been Picked.
    Document Generation Wizard is run with an option to create Delivery Note from Sales Order for qty 5 of XXXX
    Thanks,
    Caroline

    Here is the other solution:
    1. Using the draft document generator, you can generate 1 time all the invoices like draft, then you can write a query to display this invoices , then you ca put this query in the alert management to generate the report with this invoices montly when you want.....then you create the invoices that you want, this option is semi-automatic and can work good if you don't have a lot of invoices...
    2. using Data tranfer workbench, you can configure a excel template with all the invoices ready to migrate to SBO with the DTW, also you can make a alert in SBO in order to make this activity in a day montly....this is more automatic.
    3.writing "Simply" SDK project to generate this invoices... using the oinvoice SBO object to create automaticaly all the invoices that you want....you can use the draft table information in order to generate this invoices using SDK.
    The 3 solutions above are meant to resolve problem relate to auto invoice process, you can think about it.
    Rgds,

  • Error: No valid XML document received*_

    Hi All,
    We are connecting our CCMS system to NetWeaver J2EE engine on which E-Sourcing is running.
    For this we registered java component and hosts in cen.
    But we are getting error as : No valid XML document received
    Please can anyone tell me how to overcome this error.
    Thank you .
    Regards
    Mahesh

    Hi,
    Please re-read the answer from Marc carefully.  He was in the exact same situation as yours: 
    - Monitored system: NW CE 7.1
    - CEN: NW 7.01 (same as NW 7.0 EhP1)
    The link you posted is for CEN with NW 7.3 and monitored systems from NW 7.02 (and up).  Read the paragraph below the Caution sign:
    If you want to centrally monitor any system with a central monitoring system with release SAP NetWeaver 7.0, this procedure is not applicable. In this case, follow the procedure described in the newest Monitoring Setup Guide for SAP NetWeaver 7.0 instead. You can obtain the Monitoring Setup Guide at the Internet address service.sap.com/operationsnw70 in the Monitoring area.
    You should look for (and follow) the right Monitoring Setup Guide as mentioned.
    Regards,
    Dao
    Edited by: Dao Ha on Sep 19, 2011 10:38 AM

Maybe you are looking for

  • Delivery related problem in STO

    Dear All, While doing STO (Stock Transfer Order) we have raised 4 Purchase Orders (POs) among which it is observed later on that in one of the PO for one of the material the valuation type is not extended in the recipient plant.Still 4 deliveries and

  • Warning on activation of iPad

    I bought my wife an iPad Mini for Christmas. Since we are not going to be home at Christmas time when I give it to her, I activated it on her computer and loaded all the apps from her first generation iPad. Unfortunately, Apple sent a congratulatory

  • Show if recordset not empty requires a space: any way around this?

    hi, i've got a lot of recordsets which may end up empty -- possibly up to half the time. i'm trying to make the output look nice, but i'm stuck with the a space for the empty recordset. its a small thing, but i'd still like to have the text flow perf

  • Query On Sales Quotation

    Hi All,          I have made an UDF at title level named priority and set values as High, Medium and Low. When we make a sales order, we set the priority as well. Now the customer wants a query where he can get the details of number of sales quotatio

  • Locale.setDefault() doesn't pick up fonts .. workaround?

    hi, I've recently tried adding a command-line option to a swing application so you can specify the locale to use. This is to avoid having to fiddle with the locale via Windows Settings->Regional Settings which is quite slow to use. The problem is tha