XML Elements Ordering in Generated XML Output

I have a requirement where I need the xml element tags to appear in the generated xml output in the same order as in data template definition but in my case this is not happening. I have one master group - Customer and two subgroups - BillingAddress and ShipToAddress. The subgroups appear below some master elements eg. Contact but above other master elements eg. Telephone . However when the xml output is finally generated all the Master Elements appear first followed by the subgroup elements. Does anyone know how I can rectify this?
See below:
my data template structure is as follows:
- <group name="Customer" dataType="varchar2" source="Q_MASTER_FILE_CUST">
<element name="CustomerID" datatype="varchar2" value="CUSTOMER_NUM" />
<element name="CustomerTaxID" datatype="varchar2" value="TAXPAYER_ID" />
<element name="CompanyName" datatype="varchar2" value="COMPANY_NAME1" />
<element name="Contact" datatype="varchar2" value="CONTACT_NAME" />
- <group name="BillingAddress" dataType="varchar2" source="Q_MF_CUST_BILLTO">
<element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM1" />
<element name="StreetName" datatype="varchar2" value="STREET_NAME1" />
<element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE1" />
<element name="City" datatype="varchar2" value="CITY1" />
<element name="PostalCode" datatype="varchar2" value="POSTAL_CODE1" />
<element name="Region" datatype="varchar2" value="COUNTY1" />
<element name="Country" datatype="varchar2" value="COUNTRY1" />
</group>
- <group name="ShipToAddress" dataType="varchar2" source="Q_MF_CUST_SHIPTO">
<element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM2" />
<element name="StreetName" datatype="varchar2" value="STREET_NAME2" />
<element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE2" />
<element name="City" datatype="varchar2" value="CITY2" />
<element name="PostalCode" datatype="varchar2" value="POSTAL_CODE2" />
<element name="Region" datatype="varchar2" value="COUNTY2" />
<element name="Country" datatype="varchar2" value="COUNTRY2" />
</group>
<element name="Telephone" datatype="varchar2" value="PHONE_NUMBER" />
<element name="Fax" datatype="varchar2" value="FAX1" />
<element name="Email" datatype="varchar2" value="EMAIL_ADDRESS" />
<element name="WebSite" datatype="varchar2" value="URL" />
</group>
</group>
My XML Output is as follows:
<Customer>
<CustomerID>1000</CustomerID>
<CustomerTaxID>65-94238654</CustomerTaxID>
<CompanyName>World of Business</CompanyName>
<Contact>MS. Jolene Smith-Kelly</Contact>
<Telephone>8441212</Telephone>
<Fax />
<Email />
<WebSite />
- <BillingAddress>
<BuildingNumber />
<StreetName />
<AddressDetail />
<City>San Jose</City>
<PostalCode>95053</PostalCode>
<Region>Santa Clara</Region>
<Country>US</Country>
</BillingAddress>
- <ShipToAddress>
<BuildingNumber />
<StreetName />
<AddressDetail />
<City>San Jose</City>
<PostalCode>95053</PostalCode>
<Region>Santa Clara</Region>
<Country>US</Country>
</ShipToAddress>
</Customer>
It should be as follows:
<Customer>
<CustomerID>1000</CustomerID>
<CustomerTaxID>65-94238654</CustomerTaxID>
<CompanyName>World of Business</CompanyName>
<Contact>MS. Jolene Smith-Kelly</Contact>
- <BillingAddress>
<BuildingNumber />
<StreetName />
<AddressDetail />
<City>San Jose</City>
<PostalCode>95053</PostalCode>
<Region>Santa Clara</Region>
<Country>US</Country>
</BillingAddress>
- <ShipToAddress>
<BuildingNumber />
<StreetName />
<AddressDetail />
<City>San Jose</City>
<PostalCode>95053</PostalCode>
<Region>Santa Clara</Region>
<Country>US</Country>
</ShipToAddress>
<Telephone>8441212</Telephone>
<Fax />
<Email />
<WebSite />
</Customer>
is anyone able to advise?
Rani

If you know the changes necessary then you could write an XSL transformation to do them. But a generalized piece of code that examined an XML document and a schema, then produced a corrected document, would be quite difficult to write.

Similar Messages

  • How to? regarding adding xml parent tag in generated xml script using C# scripting

    Hi All,
    I have a set of transformations, which will generate xml data by reading rows from database
    here is my data flow https://social.msdn.microsoft.com/Forums/getfile/606619
    <Customer> 
    <CustomerId>1</CustomerId> 
    <Name></Name> 
    <Title></Title> 
    <Phone>1 (11) 500 555-0162</Phone> 
    <Gender>F</Gender> 
    <MaritalStatus>S</MaritalStatus> 
    <YearlyIncome>70000</YearlyIncome> 
    <BirthDate>15-02-1968 12:00:00</BirthDate> 
    <EmailAddress>[email protected]</EmailAddress> 
    <CustomerKey>11003</CustomerKey> 
    </Customer> 
    <Customer> 
    <CustomerId>2</CustomerId> 
    <Name></Name> 
    <Title></Title> 
    <Phone>1 (11) 500 555-0131</Phone> 
    <Gender>F</Gender> 
    <MaritalStatus>S</MaritalStatus> 
    <YearlyIncome>80000</YearlyIncome> 
    <BirthDate>08-08-1968 12:00:00</BirthDate> 
    <EmailAddress>[email protected]</EmailAddress> 
    <CustomerKey>11004</CustomerKey> 
    </Customer> 
    my problem is I am not able to add <?xml version="1.0" encoding="UTF-8"?> (xml tag) to output folder, which should be just at the beginning of xml file. 
    I am a beginner in SSIS, any help/hints will be appreciated.
    Regards,
    Mateen

    Why not do it in t-sql?
    http://visakhm.blogspot.in/2014/05/t-sql-tips-fun-with-for-xml-path.html
    http://visakhm.blogspot.in/2013/12/generating-nested-xml-structures-with.html
    If you want to do it in SSIS use this
    http://bicortex.com/how-to-create-an-xml-file-using-ssis-and-ms-sql-server/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • XML Elements Ordering according to XSD

    I have a XML document having XML Tags out of order but have parent child relationship intact. I have a XSD to follow. How do i convert this XML document instance into the properly ordered (Elements) XML document instance progrmatically. Need some pointers......
    For Example XSD states that <Text> should follow <Info>
    Input
    <example>
    <Text>Hello</Text>
    <Info>Text1</Info>
    <example>
    OutPut needed
    <example>
    <Info>Text1</Info>
    <Text>Hello</Text>
    <example>
    Thanks for your Help.

    If you know the changes necessary then you could write an XSL transformation to do them. But a generalized piece of code that examined an XML document and a schema, then produced a corrected document, would be quite difficult to write.

  • XML Element Order

    Hi, we deployed an app that has a web service component in 10.1.2.2 oid install of AS.
    in dev we get the output of a certain web service call as
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <ns1:getUserOrgEntitiesIdNumsResponse xmlns:ns1="http://com/fmcna/core/security/api/helpers/ISecurityHelper.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    - <return xmlns:ns2="http://com.fmcna.core.security.api.helpers/ISecurityHelper.xsd" xsi:type="ns2:com_fmcna_core_security_api_businessobjects_UserOrgEntitiesIdNums">
    - <idNames xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="xsd:string[1]">
    <item xsi:type="xsd:string">MACON</item>
    </idNames>
    - <idNums xmlns:ns4="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Array" ns4:arrayType="xsd:string[1]">
    <item xsi:type="xsd:string">1440</item>
    </idNums>
    <loginID xsi:type="xsd:string">0001440</loginID>
    <numList xsi:type="xsd:int">1</numList>
    </return>
    </ns1:getUserOrgEntitiesIdNumsResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    in qa the same call gives us
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:getUserOrgEntitiesIdNumsResponse xmlns:ns1="http://com/fmcna/core/security/api/helpers/ISecurityHelper.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xmlns:ns2="http://com.fmcna.core.security.api.helpers/ISecurityHelper.xsd" xsi:type="ns2:com_fmcna_core_security_api_businessobjects_UserOrgEntitiesIdNums">
    <loginID xsi:type="xsd:string">0001440</loginID>
    <numList xsi:type="xsd:int">0</numList>
    <idNames xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="xsd:string[0]">
    </idNames>
    <idNums xmlns:ns4="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Array" ns4:arrayType="xsd:string[0]">
    </idNums>
    </return>
    </ns1:getUserOrgEntitiesIdNumsResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    the order of the elements in dev are
    idNames
    idNums
    loginID
    numList
    in qa it is
    loginID
    numList
    idNames
    idNums
    can anyone tell us why we would expect a behaviour like this...
    thanks
    ravi

    Hallo,
    I have same problem but all parameters seems ok...
    <Table> is an invalid table element or appears in the wrong order.
    <variant>
      <Table xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0" xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid5:tablestyle="Art.-Table" aid:table="table" aid:trows="64" aid:tcols="7">
        <cell aid5:cellstyle="Art.-Cell" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="58">
    I am using Indesign CC 2014

  • Restrict Purchase Order to generate custom output message on condition.

    Hi Experts,
    We have custom message / output types ZEMA(E-Mail) & ZNEU(Standard Mail) configured for Purchase Orders.
    We have a requirement from client to restrict the generation of output message ZEMA, if the amount of the PO is greater than some limit say 100USD. And the message output should also be avoided to create entry in ME9F.
    Can you please advise if there are some way (User Exit?) that prevent the output message in this scenario (specific PO Type) without touching the current Condition setup?
    Here I would need the new PO object being created and the amount on the PO from the field NETWR.
    Thanks,
    Ankur

    Hi Jurgen,
    Sorry for missing out the Dump details earlier.Please find below an extract from the dump:
    Category               ABAP Programming Error
    Runtime Errors         POSTING_ILLEGAL_STATEMENT
    ABAP Program           FRMSCM0012
    Application Component  Not assigned
    Date and Time          10.06.2014 08:30:46
    Error analysis
         There is probably an error in the program
         "FRMSCM0012".
         This program is triggered in the update process. The following ABAP
         statements are illegal here:
         - CALL SCREEN
         - CALL DIALOG
         - CALL TRANSACTION
         - SET SCREEN
         - LEAVE TO LIST-PROCESSING
         - SUBMIT
         - LEAVE SCREEN
         - LEAVE LIST-PROCESSING
         - LEAVE PROGRAM
         - LEAVE TO TRANSACTION
         - MESSAGE I/W/E (if not handeld using EXCEPTIONS ERROR_MESSAGE)
         - MESSAGE A
    How to correct the error
         Probably the only way to eliminate the error is to correct the program.
    If the error occurs in a non-modfied SAP program, you might be able to
    find a solution in the SAP Notes system. If you have access to the SAP
    Notes system, check there first using the following keywords:
    "POSTING_ILLEGAL_STATEMENT"
    "FRMSCM0012" bzw. FRMSCM0012_SF
    "SFORM_PRINT_OUTPUT"
    Information on where terminated
        The termination occurred in ABAP program "FRMSCM0012", in
         "SFORM_PRINT_OUTPUT". The main program
        was "RSM13000 ".

  • XML Report Issue while generating the Report in EXCEL

    Hi All,
    I have Created the XML Report which will generate the output in EXCEL format. I am having the issue with the report output in EXCEL.
    In my Case,
    If I ran the concurrent it got completed normally and the output got completed normally and the output is generated successfully if the data for the input parameter combinations exists.
    Issue is if there is no data exists for the combinations of parameters choosen then it gives the output in excel with the headers alone some times. (meaning there is no combinations of data exists for the input given excel is having headers alone).
    wiseversa
    sometimes the output in excel there is no header part too..(meaning the excel is empty/null).
    Could anyone suggest how to resolve the issue so that the output in excel can include the header part if the data not exists for the input given. so that it should not generate the output as blank in excel i want the header alone should be included even if the report has no data for the input combination given.
    Its very urgent issue.
    Any suggestion will be a great help for me.
    Thanks ,
    Ravi.

    Hi,
    Please see if this thread helps.
    XML publisher output report in excel format
    Re: XML publisher output report in excel format
    Regards,
    Hussein

  • Multi-level nested tables for repeatable XML Elements

    Hi there,
    Suppose we have a XML Schema „ASchema“ like this (XMLDB schema annotations are left out for simplicity):
    <xs:schema xmlns:xs=" .... " />
    <xs:element name=“A“>
         <xs:complexType>
              <xs:sequence>
                   <xs:element name=“B“ maxOccurs=“unbounded“/>
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name = “C“ maxOccurs=“unbounded“/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:element>
    </xs:schema>
    After registering this schema in Oracle, I can define a table like this:
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    This creates a nested table "BTable" within the table "ATable". So far so good, I can use this nested table to gain faster access on every possible subelement of Element B when I set an appropriate index.
    I now want to create another nested table for element “C“ like this:
    DROP TABLE ATable;
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    VARARRAY doc.“XMLDATA“.“B“.“C“ STORE AS TABLE “CTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    But this statement fails with the error message something like „ ... no such attribute ... „
    And here's my question: is it possible to create nested tables for repeatable XML Elements that are subelements of other repeatable XML Elements ? And if so, how can I do it ?
    Thank you very much in advance
    Jan

    Found a (partial) solution myself:
    If you add the attribute xdb:storeVarrayAsTable="true" to the root element of the XML schema, Oracle XMLDB generates nested tables for all repeatable XML Elements while registering the XML schema.
    Unfortunately, the names of these nested tables are system-generated, hence it's a bit uncomfortable to set indices on them. You can find out the names of these nested tables as follows:
    select table_name, parent_table_name, parent_table_column from user_nested_tables;
    Further information on that subject is supplied in the following thread:
    Re: default tables for elements with maxoccurs > 1
    It would be nice if there was a way to name the generated nested tables via appropriate XMLDB schema annotations.
    regards
    Jan

  • Exception in assigning XML elements value in Workshop

    Hi ,
    I tried creating a variable of type XML object(OrderREsponse). I have one MB Publisher control which sends in a variable of type OrderResponse. Before sending it , I try setting the individual XML elements value in it. So, for all the individual elemtns , I set accordinglly in both the formats.
    responseXML.addNewOrderResponse().setOrderNumber("N12121212");
    responseXML.getOrderResponse().setOrderNumber("N12121212");
    where responseXML is a variable of type OrderResponse document.
    This place while executing I'm getting an exception.
    Here is the exception I'm getting.
    <Jan 4, 2005 10:51:11 AM MST> <Warning> <WLW> <000000> <Id=top-level; Method=com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration()
    ; Failure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled process exception [ServiceException]>
    <Jan 4, 2005 10:51:12 AM MST> <Warning> <WLW> <000000> <A message was unable to be delivered from a WLW Message Queue. Attempting to deliver
    the onAsyncFailure event>
    Let me know if the approach is the right one... or how can i set the individual XML elements value from a XML variable.
    Thanks
    Ramesh

    Hi ,
    I tried creating a variable of type XML object(OrderREsponse). I have one MB Publisher control which sends in a variable of type OrderResponse. Before sending it , I try setting the individual XML elements value in it. So, for all the individual elemtns , I set accordinglly in both the formats.
    responseXML.addNewOrderResponse().setOrderNumber("N12121212");
    responseXML.getOrderResponse().setOrderNumber("N12121212");
    where responseXML is a variable of type OrderResponse document.
    This place while executing I'm getting an exception.
    Here is the exception I'm getting.
    <Jan 4, 2005 10:51:11 AM MST> <Warning> <WLW> <000000> <Id=top-level; Method=com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration()
    ; Failure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled process exception [ServiceException]>
    <Jan 4, 2005 10:51:12 AM MST> <Warning> <WLW> <000000> <A message was unable to be delivered from a WLW Message Queue. Attempting to deliver
    the onAsyncFailure event>
    Let me know if the approach is the right one... or how can i set the individual XML elements value from a XML variable.
    Thanks
    Ramesh

  • Mssing DOCTYPE in generated XML

    I use PLSQL-XML-Packages (xmldom) to generate XML from database. I want to include a DOCTYPE with the name of the DTD in my XML-File. The xmldom-Package does not support setting DOCTYPE.
    Any suggestions ?
    best regards,
    Andreas Weiden

    A setDoctype() procedure is supported in the PLSQL XML Parser release 9.0.0.0.0 Beta that is about to be posted here on OTN.

  • How to access XML elements by name in Extendscript??

    I'm almost done the script that I've been working on, but something has been nagging me since I started. When I did start, I looked at the JS Tools Guide CS5 that comes with the extendscript ide to check how to access XML elements, children, attributes etc. It says this:
    The XML object represents an XML element node in an XML tree. The topmost XML object for an XML file
    represents the root node. It acts as a list, which contains additional XML objects for each element. These in
    turn contain XML objects for their own member elements, and so on.
    The child elements of an element tree are available as properties of the XML object for the parent. The
    name of the property corresponds to the name of the element. Each property contains an array of XML
    objects, each of which represents one element of the named type.
    So basically it converts the XML into JSON. And you can access the properties like so:
    <book category="COOKING">
         <title lang="en">The Boston Cooking-School Cookbook</title>
         <author>Fannie Merrit Farmer</author>
         <year>1896</year>
         <price>49.99</price>
    </book>
    The Javascript statement bookstoreXML.book; returns the entire list of books.
    The statement bookstoreXML.book[0]; returns the XML object for the first book.
    The statement bookstoreXML.book[0].author; returns all authors of the first book.
    A couple pages down it talks about Retrieving contained elements using children(), elements(), descendants().
    So now I look through the XML Object properties and I see that I can use:
    xmlObj.child (which) which A String, the element name, or a Number, a 0-based index into this node’s child array.
    or
    xmlObj.descendants ([name])
    name Optional. A String, the element name to match. If not provided, matches all
    elements.
    or
    xmlObj.elements (name);
    name Optional. A String, the element name to match. If not provided, matches all
    elements.
    This is an excerpt of an XML I was working with:
    <ROW xmlns="http://www.filemaker.com/fmpdsoresult"
         MODID="16"
         RECORDID="11128">
       <Sign_Type>251.dr</Sign_Type>
       <fm:Location xmlns:fm="http://www.filemaker.com/fmpdsoresult" xmlns="">5-5024</fm:Location>
       <Line1>Zone
    Floor
    3
    Patient Rooms
    R532 - R436 even
    Patient Rooms
    R522 - R446 even
    Xavier Elevators
    Zone
    Patient Rooms
    R537 - 5757 odd
    Main Elevators
    Zone</Line1>
    </ROW>
    Extendscript will not give me an anything when I try to access elements by name. Instead I have to access by index, which works, but I'd rather search for names!
    Actually the console log returns: <![CDATA[]]>
    What am I doing wrong!?

    First, those E4X XML objects are definitely no JSON (plain data) - they have a multitude of methods, even for tasks that would easily be implemented as property (e.g. the length() function), and they also bind xml element and attribute names onto the objects, allowing to target a multitude of XML nodes with a single statement. Or did you mean your script with that "it"?
    Anyway, as you found out the ExtendScript XML object handles namespaces mostly by hiding them from you.
    You could play around with global namespace settings, see the JavaScript tools guide.
    You could also explicitly specify a namespace. This works for me:
    $.writeln(myXML["fm:Location"]);
    For simple use I had most success with a brute force approach that just strips the namespaces.
    function removeAllNamespace(xml)
              var ns =new Namespace();
              var d=xml.descendants();
              for (var i=0;i<d.length();i++)
        d[i].setNamespace(ns);

  • Concurrent generating wrong output format with TEXT as output type

    Hi,
    I have create a custom rdf and set TEXT as its output type.
    I want the text output to be specific format but the concurrent is not generating the exact expected output.
    Expected Output:
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE labels SYSTEM "label.dtd">
    <labels FORMAT="E:WIPMATX.ZPL" _QUANTITY="1" _PRINTERNAME="Printer
    1" _JOBNAME="LBL101">
    <label>
    <variable name="$$WIP_ENTITY_NAME$$">BLFTOP</variable>
    <variable name="$$WIP_ENTITY_NAME$$">BLFTOP14</variable>
    <variable name="COM">19AWG</variable>
    <variable name="LOT_NUMBER"></variable>
    <variable name="ASSEMBLY">A05A0084-1</variable>
    <variable name="QUANTITY_ISSUED">0</variable>
    </label>
    </labels>
    *Wrong Output:*
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE labels SYSTEM "label.dtd">
    <labels _FORMAT="E:WIPMAT_X.ZPL" _QUANTITY="1" _PRINTERNAME="Printer
    1" _JOBNAME="LBL101">
    <label>
    <variable name="$$WIP_ENTITY_NAME$$"> BLFTOP </vari
    </variable>
    <variable name="$$WIP_ENTITY_NAME$$"> BLFTOP
    BLFTOP14</variable>
    <variable name="COM">19AWG</variable>
    <variable name="LOT_NUMBER"></variable>
    <variable name="ASSEMBLY">A05A0084-1</variable>
    <variable name="QUANTITY_ISSUED">0</variable>
    </label>
    </labels>
    And Actually i am trying to generate this output format type because , wer are using Zebra Printer to print lable and it is a XML enabled bprinter and understand this specifice XML DTD type. We found when set Output type to XML, it was not generating XML in accordance with DTD which Zebra printer understand Hence we are tring to use TEXT output.
    Please suggest.
    Edited by: user5499188 on Oct 3, 2011 12:12 AM
    Edited by: user5499188 on Oct 3, 2011 12:13 AM
    Edited by: user5499188 on Oct 3, 2011 12:14 AM
    Edited by: user5499188 on Oct 3, 2011 12:23 AM

    I get the solution for this issue.
    The solution is to use XML Publisher etext temaplate.
    Etext is used to get text output in any format.
    Regards, :)

  • Generate xml source file for Oracle Order Capture Print Quote

    Hi,
    I am new to xml and need to work on creating templates for Print Quote.
    I am trying to generate the xml source file for which I enabled the report in system administrator and set the output to XML and assigned to Quoting Reports responsiblity. I then assigned XML Report Publisher to the same responsiblity.
    I ran the report (Print Quote) and then I am trying to run the XML Report Publisher but I cannot get the request id in the list of values.
    I am able to generate xml source file for other reports like Printed Purchase Order etc.,
    The view output for the (Print Quote) report is as follows:
    <?xml version="1.0" ?>
    - <!-- Generated by Oracle Reports version 6.0.8.26.0
    -->
    <ASOPQTER />
    How do I get the xml source file? Or are there seeded templates that I can use to create more templates? Any help would be appreciated. Thanks Ravi

    Hi, I am in the same position - did this issue ever ger resolved by anyone. I have done a few XMLP reports successfully now using the Word add-in, but customising the Quote output differs from other standard reports.
    If you look at the data definition for Quote it is a 'dummy' definition and has no XML file attached. Does anyone know how I can get the XML format for the report output?
    Also the template uses XSL-FO ?!?!?! rather than RTF - not sure how to work with this, the Oracle docs are not very helpful in this regard either.
    Has anyone successfully managed to customise the Quote print report? Many thanks,
    Roger

  • How to make XML element used in RTF PRIVATE/PUBLIC ? I know how to hide columns in RTF, but dont know how to generate the xml in below way. Please help.

    Hi
    I am following below link to hide/show my columns dynamically. See "Column Formatting"
    http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187.pdf
    As per doc, element can be made private/public.
    <items type="PUBLIC">
    <item>
      <name>Plasma TV</name>
      <quantity>10</quantity>
      <price>4000</price>
    </item>
    <item>
    And same can be used to hide the column using condition
    <?if@column:/items/@type="PUBLIC"?>
    MY QUESTION IS HOW TO DO THIS IN MY XML BELOW?
    Below is part of my XML code which I am using in Data Definition for RTF.
    <group name="GH3" source="QH3">
    <element name="COLUMN_HEAD3" value="COLUMN_NAME" />
    </group>
    <group name="GH4" source="QH4">
    <element name="COLUMN_HEAD4" value="COLUMN_NAME" />
    </group>
    I am getting output like this.
    <LIST_GH3>
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4>
    <GH4>
    <COLUMN_HEAD4>XYZ</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    In order to use logic as per oracle document I want output like this.
    <LIST_GH3 type="PUBLIC">
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4 type="PRIVATE">
    <GH4>
    <COLUMN_HEAD4>BLANK</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    What changes I need to make in my XML code to get the runtime output as above? Please help. Where do i need to make changes in the above xml? Group name? Element name?
    I am planning to use below condition in RTF template to hide the column,  but dont know how to set the type of column as PRIVATE/PUBLIC in the XML output used to populate data in the RTF at runtime.
    <?if@column:/BTSPIEXP/LIST_GH3/@type=”PUBLIC”?>COLUMN_HEAD3<?end if?>
    Regards,
    Swapnil K.

    Hi,
    Issue has been resolved. I used the value of the element to determine to display it or not.
    Regards,
    Swapnil K.

  • Imported XSLT cannot create attributes for generated XML element

    I have two xslts. One imports the other.
    The imported xslt creates XML elements with attributes and this XML is stored in a variable in the main stylesheet
    If I perform the transformation with JRE prior to 1.6.0.18 then all works fine
    If I use 1.6.0.18 or 1.6.0.19 then the attributes aren't added.
    If I add attributes in the main xslt it works fine or if I output the element directly instead of first storing it in a variable then it also works fine.
    Problem seems to be when you try to add attributes from an imported stylesheet and store the generated element in a variable.
    Below two stylesheets to illustrate :
    First MainStylesheet.xsl
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Copyright 1993-2005 Seagull Software Systems, Inc. -->
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:exsl="http://exslt.org/common"
    extension-element-prefixes="exsl"
    exclude-result-prefixes="xs">
    <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" />
    <xsl:import href="innerstylesheet.xsl"/>
    <xsl:template match="/TestData">
    <xsl:variable name="generatedElementXml">
    <xsl:call-template name="generateElement">
    <xsl:with-param name="s">testValue</xsl:with-param>
    </xsl:call-template>
    </xsl:variable>
    <xsl:for-each select="exsl:node-set($generatedElementXml)">
    *** GeneratedElementXML {<xsl:text>
    </xsl:text><xsl:copy-of select="*"></xsl:copy-of>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>Next innerstylesheet.xsl
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:exsl="http://exslt.org/common"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    extension-element-prefixes="exsl" >
            <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
            <xsl:template name="generateElement">
                       <xsl:param name="s"/>
                    <TestElement testAttribute="$s" />
            </xsl:template>
    </xsl:stylesheet>The result output by jres before 1.6.0.18 is :
    <?xml version="1.0" encoding="UTF-8"?>
                   *** GeneratedElementXML {
              <TestElement xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" testAttribute="testValue"/>
                   }          The result output by jres since 1.6.0.18 is :
    <?xml version="1.0" encoding="UTF-8"?>
                   *** GeneratedElementXML {
              <TestElement xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                   }          Note : the 'testAttribute' attribute is missing

    Have found the difference in the code
    In both JRE1.6.0_17 & JRE1.6.0_18, the class 'com.sun.org.apache.xalan.internal.xsltc.dom.AdaptiveResultTreeImpl' has the following method
    public void addUniqueAttribute(String qName, String value, int flags)
            throws SAXException
            addAttribute(qName, value);
        }In JRE1.6.0_17 the next method is
    public void addAttribute(String name, String value)
         if (_openElementName != null) {
             _attributes.add(name, value);
         else {
             BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, name);
        }In JRE1.6.0_18 the next method is
    public void addAttribute(String uri, String localName, String qname,
                String type, String value)
         if (_openElementName != null) {
             _attributes.addAttribute(uri, localName, qname, type, value);
         else {
             BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, qname);
        }Note - the addAttribute method has additional parameters in JRE1.6.0_18 but the call from addUniqueAttribute wasn't updated.
    So in JRE1.6.0_18 addUniqueAttribute actually invokes the following method in the base package com.sun.org.apache.xml.internal.serializer.EmptySerializer
    public void addAttribute(String name, String value)
            aMethodIsCalled();
    void aMethodIsCalled()
            // throw new RuntimeException(err);
            return;
        }and as you can see this does nothing. Hence the fact that the attribute isn't added.

  • Most effecient way to generate XML output

    What is the most effecient way to generate XML output using ORACLE.
    Presently I am aware of the following:
    1)DBMS_XMLQUERY
    2)DBMS_XMLGEN
    3)SQLX functions
    We are using the first 2 in our database to generate hierarchical XML. Once the XML is generated the XML file is ftp'd to a UNIX box. Because of the file size restrictions in our UNIX bix we decided not to transform the XML output into XML Attributes.
    The attributes are assigned from an XSLT file and the raw XML file is transformed to a file which has attributes.
    My question is:
    In the Oracle Database release 9.2 is there a better efficient way to genarate the final XML file with Attributes from the database side without using the XSLT. If yes, please give an example how to do this?
    Thank You

    In general the SQL/XML publishing functions are the most efficient way..
    DBMS_XMLQUERY is a legacy technology imlimented in Java. The main advantage is that it can be run outside the database in the mid-tier is required.
    DBMS_XMLGEN is a re-implementation of DBMS_XMLQUERY in 'C' which runs inside the database. In most cases it should be much faster than DBMS_XMLQUERY. It provides some features that are still not availalble in the SQL/XML standard such as the ability to generate XML based on a cursor, and the ability to generate recursive output from a connect by query. It is hoped that future versions of the SQL/XML publishing functions will address these issues.
    Both DBMS_XMLGEN and DBMS_XMLQUERY are somewhat limited in terms of generating complex XML documents with multiple levels of nesting.
    The SQL/XML publishing functions are the preferred way of generating XML from relational data. THey provide the ability to generate extremely complex XML structures from relation data and provide full control over element / attributes names, levels of nested etc. Future development projects will focus on enhancing the performance and functionality of the SQL/XML publishing functions rather than the PL/SQL packages
    In general if you can use SQL/XML publishing functions you should do so.
    Does this help....

Maybe you are looking for