Generating XML based on XSD.

HI All,
I have an XSD and some data (in the form of value objects)that needs to be represented as XML . is thr any way to generate my XML dynamically using by data and reading the XSD content.
Thanks
-vijay

Hi,
If u want to create XML document according to the XSD you defined then u can use the JAXB API, here you do the Marshalling which directly converts the java objects into the XML document.
Ref this link:-
http://java.sun.com/xml/jaxb/users-guide/jaxb-using.html#sampapp3

Similar Messages

  • Namespace issue while generating XML based on xsd

    Hi All,
    I am using Jdeveloper-11.1.1.6
    SOA:- 11.1.1.6
    WLS:- 11.3.6
    When i am publishing xml message i am getting name space issue.
    My process design as i am getting a message from AQ JMS and doing a transformation with out any logic and writing into a file based on the xsd.
    Here is the my target xsd structure
    <xs:schema id="RelieveIntransitSchema"
    targetNamespace="http://tempuri.org/RelieveIntransitSchema.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/RelieveIntransitSchema.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="RelieveIntransits">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="RelieveIntransit" minOccurs="1" maxOccurs="unbounded">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="RelieveStore" minOccurs="1" maxOccurs="unbounded">
    <xs:complexType>
    <xs:sequence></xs:sequence>
    <xs:attribute name="StoreID" type="xs:string"/>
    <xs:attribute name="Units" type="xs:double"/>
    <xs:attribute name="RelieveAllStores" type="xs:boolean"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="HeaderID" type="xs:string" use="optional"/>
    <xs:attribute name="ProductID" type="xs:string" use="required"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    My actual target xml should be of
    <?xml version="1.0"?>
    <RelieveIntransits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/RelieveIntransitSchema.xsd">
    <RelieveIntransit HeaderID="DA41198901491301" ProductID="D037-63-1270S">
    <RelieveStore StoreID="D001" Units="0002092 " />
    <RelieveStore StoreID="D003" Units="0000022 " />
    </RelieveIntransit>
    </RelieveIntransits>
    But the out xml generating as below which is not accepted by target system
    <?xml version="1.0" encoding="UTF-8"?>
    <RelieveIntransits xmlns="http://tempuri.org/RelieveIntransitSchema.xsd" xmlns:ns5="http://tempuri.org/RelieveIntransitSchema.xsd"> <ns5:RelieveIntransit ProductID="6534562" HeaderID="10R7771-6534562001-109"> <ns5:RelieveStore Units="5" StoreID="118"/>
    <ns5:RelieveStore Units="5" StoreID="118"/>
    </ns5:RelieveIntransit>
    </RelieveIntransits>
    Could some one please help me how to generate actual one as shown above with out namespace prefix "ns". I tried xsl code for removing name space prefix using https://forums.oracle.com/forums/thread.jspa?threadID=1122673 but it is removing url also.
    Regards,
    Tarak
    Edited by: Tarak on Jul 26, 2012 11:39 AM

    Hi,
    Sorry for my delay response.
    Both xmls are valid and equivalent for me... should be equivalent to <ns1:a xmlns:ns1="namespace"/>...
    I agree to your point.
    What is your target system? If that makes difference for your target system I would say it is not fully XML compliant...
    Target system is an old one called as MID. Yes i agree it is not fully XML Compliant. I am publishing the message through file adapter and it is reading the file.
    But anyway... The trick in the other thread should work... What do you mean by "removing url also" ???
    Using the Namespaces remove xsl code i am getting structure as below. In this alone with prefix name space url also getting removed.
    <RelieveIntransits>
    <RelieveIntransit HeaderID="DA41198901491301" ProductID="D037-63-1270S">
    <RelieveStore StoreID="D001" Units="0002092 " />
    </RelieveIntransit>
    </RelieveIntransits>
    I am expecting like this
    <?xml version="1.0"?>
    <RelieveIntransits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/RelieveIntransitSchema.xsd">
    <RelieveIntransit HeaderID="DA41198901491301" ProductID="D037-63-1270S">
    <RelieveStore StoreID="D001" Units="0002092 " />
    </RelieveIntransit>
    </RelieveIntransits>

  • Need to generate XML based on Data template

    Hi,
    I'm unable to submit (the second submit) my request using the demo links (XDO 5.6.3 or XDO 5.7) provided in http://bipublisher.us.oracle.com/?tab=samples&header=dataTemplate to generate the XML based on the data template.
    Heard that these links are available for Oracle EBS internal use. I work with EBS-CRM. I need to generate XML based on a data template and use the XML in the template. Data template has two queries for a template.
    Pls help.
    Thanks,
    Impha

    Impha
    Please use the internal mailing list for your questions the forum is meant for external customers. If you do not know the ML name - drop me a mail
    Tim

  • Generating XML instance from XSD

    Hi,
    I want to know ( java program etc ) to generate XML instance from XSD. How tools ( XML Spy, Oxygen ) generate sample XML file from XSD. What APIs can be used for generating XML from XSD and what APIs are used for checking If XML instance conforms to a XSD? Is it big deal to implement it?
    Thanks in advance
    Sandeep

    To validate xml against XSD , I found I can use the existing parsers( using JAXP which has SAX and DOM APIs ) in current JDKs and validate. I still did not find the best way to generate xml from XSD and how tools like xml spy and oxygen generates sample xml file from xsd.
    Thanks
    Sandeep

  • Create XML based on XSD

    Hello all,
    I need to generate XML file based on XSD template in Java, I can parse the XSD file, but don’t know after parsing, hot to generate XML file.
    Do you know any example or suggestion how to do it please? I’m not very expert on this, so I appreciate any help.
    Many thanks in advance.

    I'm curious why you didn't find this links in google:
    http://www.youtube.com/watch?v=kOLziP28598
    Using JAXB to generate XML from XSD | Java Code Geeks
    bye
    TPD

  • Generate xml based on folders & files

    I was wondering if it was possible for Coldfusion to generate
    an XML file based on the folders and files within those folders?
    Basically what I would like is to create a main folder that
    contains the Coldfusion file that when the user goes to the site,
    Coldfusion would look within it's folder for all sub-folders and
    files within and create and XML file that Flash would then consume.
    Is this possible? If so, I'd really appreciate it if someone could
    let me know where I could find more information this.
    Thanks in advance,
    shayne

    Use the cfdirectory tag to get your data and the cfxml tag to
    convert it into xml.

  • XML issues : Genearte XML based on XSD

    hi please help me in sorting this issue
    How would I generate an XML document from XML-DB which conform to a registered
    Schema? My tables and xsd are as follows:
    Customer table
    ==============
    create table cust
    ( id number primary key,
    last_name varchar2(50),
    first_name varchar2(50),
    fullname varchar2(50),
    dob date
    Cust_address table
    ==================
    create table cust_address
    (addr_id number primary key,
    address_1 varchar2(100),
    address_2 varchar2(100),
    county varchar2(4),
    home_ph varchar2(20),
    office_ph varchar2(20),
    cust_id number references cust(id) );
    Some data
    SQL> insert into cust
    2 values( 1, 'Harvey','John','Jeff M Harvey','18-jun-80');
    1 row created.
    insert into cust_address
    values ( 1,' 21 West Trophy Road','Memphis,
    TN','0009','901-6782345','901-768234',1);
    My XMLSchema is as follows:
    ===========================
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 rel. 3 U (
    http://www.altova.com
    by John -->
    <xs:schema
    xmlns="
    http://www.oaws.org/CAR"
    xmlns:xs="
    http://www.w3.org/2001/XMLSchema"
    targetNamespace="
    http://www.oaws.org/CAR"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
    <xs:element name="CARData">
    <xs:annotation>
    <xs:documentation>Customer Contact information etc
    </xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Name" type="NameType"/>
    <xs:element name="Address" type="AddressType"/>
    <xs:element name="PlayerContact">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Name" type="NameType"/>
    <xs:element name="Address" type="AddressType"/>
    <xs:element name="PlayCntySher" type="xs:string"/>
    <xs:element name="PlayCntyClk" type="xs:string"/>
    <xs:element name="PlayAlsTyp" type="xs:string"/>
    <xs:element name="Play" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="BankContact">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="BKName" type="xs:string"/>
    <xs:element name="BKAddr1" type="xs:string"/>
    <xs:element name="BKAddr2" type="xs:string"/>
    <xs:element name="BKAddrfnl" type="xs:string"/>
    <xs:element name="BKCNTY" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="LTRDT" type="xs:date"/>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="AddressType">
    <xs:sequence>
    <xs:element name="playaddr1">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playaddr2">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playaddrfnl" type="xs:string"/>
    <xs:element name="playhomecomm">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playwrkcomm">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playcnty">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="25"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NameType">
    <xs:sequence>
    <xs:element name="PlayFullName" type="xs:string"/>
    <xs:element name="PlayFName" type="xs:string"/>
    <xs:element name="PlayLName" type="xs:string"/>
    <xs:element name="PlayDefName" type="xs:string"/>
    <xs:element name="PlayIDNum">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="12"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PlayDob" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    <xs:simpleType name="money">
    <xs:restriction base="xs:decimal">
    <xs:totalDigits value="14"/>
    <xs:fractionDigits value="2"/>
    </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="CollectorType">
    <xs:sequence>
    <xs:element name="CollectorNumber" type="xs:integer"/>
    <xs:element name="CarFullName" type="xs:string"/>
    <xs:element name="CollectorPhone" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    I have registered this schema in to my database schema
    SQL> begin
    2 dbms_xmlschema.registerSchema
    3 (
    4 '
    http://tien.oaws.silver:8080/home/CAR/xsd/',
    5 xdbURIType('/home/CAR/xsd/CARSchema.xsd').getClob(),
    6 True,True,False,True
    7 );
    8 End;
    9 /
    PL/SQL procedure successfully completed.
    Now I need to generate an XML which include all elements from CUST and
    CUST_ADDRESS table and must conform to the XML Schema, need your help.
    Thank you.

    Please someone help me...

  • Generate XML based on MySQL Query

    Hello guys,
    I need to create a XML file like this one(same structure) but based on MySQL query:
    <chart>
       <chart_type>pie</chart_type>
       <chart_data>
          <row>
             <null/>
             <string>2007</string>
             <string>2008</string>
             <string>2009</string>
          </row>
          <row>
             <string>Region A</string>
             <number>10</number>
             <number>30</number>
             <number>63</number>
          </row>
       </chart_data>
    </chart>
    I found a couple of good articles but I do not know how to get the same structure, I tried this:
    <?php
    header("Content-type: text/xml");
    $host = "localhost";
    $user = "test";
    $pass = "test";
    $database = "test";
    $enlace = mysql_connect($host, $user, $pass) or die("Error MySQL.");
    mysql_select_db($database, $enlace) or die("Error base de datos.");
    $query = "SELECT AGENTE, count(*) FROM clientes group by agente";
    $resultado = mysql_query($query, $enlace) or die("Sin resultados.");
    $salida_xml = "<?xml version=\"1.0\"?>\n";
    $salida_xml .= "<chart>\n";
    $salida_xml .= "<chart_type>" . 'pie' . "</chart_type>\n";
        $salida_xml .= "<chart_data>\n";
        for($x = 0 ; $x < mysql_num_rows($resultado) ; $x++){
            $fila = mysql_fetch_assoc($resultado);
            $salida_xml .= "\t<row>\n";
            $salida_xml .= "\t\t<agente>" . $fila['AGENTE'] . "</agente>\n";
            $salida_xml .= "\t\t<cantidad>" . $fila['count(*)'] . "</cantidad>\n";
                // Corregiendo caracteres incorrectos
                $fila['texto'] = str_replace("&", "&amp;", $fila['texto']);
                $fila['texto'] = str_replace("<", "&lt;", $fila['texto']);
                $fila['texto'] = str_replace(">", "&gt;", $fila['texto']);
               // $salida_xml .= "\t\t<texto>" . $fila['texto'] . "</texto>\n";
            $salida_xml .= "\t</row>\n";
        }//segundo for
        $salida_xml .= "</chart_data>\n";
    $salida_xml .= "</chart>";
    echo $salida_xml;
    but I'm not getting the same structure, I am getting this:
    <chart>
    <chart_type>pie</chart_type>

    <chart_data>
    <row>
        </row>

    <row>
    <agente>Danilo</agente>
    <cantidad>8</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Evelyn</agente>
    <cantidad>5</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Maribel</agente>
    <cantidad>2</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Nestor</agente>
    <cantidad>11</cantidad>
    </row>
    <row>
        </row>

    <row>
    <agente>Noemy</agente>
    <cantidad>2</cantidad>
    </row>
    </chart_data>
    </chart>
    Can someone give me a hand plase?
    Thanks in advance

    Doing some extra research I almost get to the result that I need, I guess I am jus
    t having an small problem.
    Basically I need this
    [PHP]
    <chart>
       <chart_type>pie</chart_type>
       <chart_data>
          <row>
             <null/>
             <string>2007</string>
             <string>2008</string>
             <string>2009</string>
          </row>
          <row>
             <string>Region A</string>
             <number>10</number>
             <number>30</number>
             <number>63</number>
          </row>
       </chart_data>
    </chart>
    [/PHP]
    Currently I have this:
    [PHP]
    <chart>
        <chart_type>pie</chart_type>
        <chart_data>
            <row>
                <null></null>
                <agente>Danilo</agente>
                <agente>Evelyn</agente>
                <agente>Maribel</agente>
                <agente>Nestor</agente>
                <agente>Noemy</agente>
            </row>
            <row>
                <rutas>rutas</rutas>
                <cantidad></cantidad>
                <cantidad></cantidad>
                <cantidad></cantidad>
                <cantidad></cantidad>
                <cantidad></cantidad>
            </row>
        </chart_data>
    </chart>
    [/PHP]
    And I am using this code
    [PHP]<?php
    header("Content-type: text/xml");
    $host = "xxx";
    $user = "xxxx";
    $pass = "xxxx";
    $database = "xxxx";
    $enlace = mysql_connect($host, $user, $pass) or die("Error MySQL.");
    mysql_select_db($database, $enlace) or die("Error base de datos.");
    $query = "SELECT AGENTE, count(*) FROM clientes WHERE PREVENTA LIKE 'Viernes' group by agente";
    $resultado = mysql_query($query, $enlace) or die("Sin resultados.");
    $salida_xml = "<?xml version=\"1.0\"?>\n";
    $salida_xml .= "<chart>\n";
    $salida_xml .= "\t<chart_type>" . 'pie' . "</chart_type>\n\n";
    $salida_xml .= "\t<chart_data>\n";
                $salida_xml .= "\t\t<row>\n";
                $salida_xml .= "\t\t\t<null>" . $fila5['NULL']. "</null>\n";
                for($y = 0 ; $y < mysql_num_rows($resultado) ; $y++){
                    $fila2 = mysql_fetch_assoc($resultado); 
                    $salida_xml .= "\t\t\t<agente>" . $fila2['AGENTE'] . "</agente>\n";
                    }//cierro for Y
                $salida_xml .= "\t\t</row>\n";
                $salida_xml .= "\t\t<row>\n";    
                $salida_xml .= "\t\t\t<rutas>" . 'rutas'. "</rutas>\n";
                for($z = 0 ; $z < mysql_num_rows($resultado) ; $z++){
                    $valor = mysql_fetch_assoc($resultado);
                    $salida_xml .= "\t\t\t<cantidad>" . $valor['count(*)'] . "</cantidad>\n";
                }//cierro for z
                $salida_xml .= "\t\t</row>\n";
        $salida_xml .= "\t</chart_data>\n";
    $salida_xml .= "</chart>";
    echo $salida_xml;
    ?>[/PHP]
    The issue I am having is that it is not showing the quantity, in this case "cantidad", does someone know why?

  • How to generate XML file based on XSD in SSIS

    please provide step by step process to create xml based on XSD in SSIS  

    Hi hemasankar,
    In SQL Server Integrated Services, we can generate XML Schema (XSD) file based on a XML file with XML Source Editor. If we want to generate XML file based on a XSD file, we can use Generate Sample XML feature in Visual Studio. For more details, please refer
    to the following steps:
    Click on "XML Schema Explorer" or 'Use the XML Schema Explorer...' to open XML Schema Explorer in Visual Studio. 
    If your Schema file is valid and you are having elements, right-click on element and click on "Generate Sample XML", this functionality generates XML file in temp folder and open ups in the XML Editor.
    The following two document about how to generate XML file based on a XSD file are for your reference:
    http://msdn.microsoft.com/en-us/library/dd489258.aspx
    http://www.codeproject.com/Articles/400016/Generate-Sample-XML-from-XSD
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • HELP in Generating XML(PLz help its urgent)

    Hi,I need to generate XML FIle.Since i m new to XML.
    I had toregister the valid schema in my DB now i want to generate the XML file and with the refernce to this schema that xml file should be validated one against that schema.
    things i hav done till now
    ->i hav registered the scehma
    and the sample XML file provided by client
    <?xml version="1.0"?>
    <MEDMLDATA xmlns="PhaseForward-MedML-Inform4">
    <!-- Insert Trial/Study Information -->
    <STUDYVERSION UUID="id"
    STUDYNAME="name"
    VERSIONDESCRIPTION="text" />
    <!-- Insert Site Personnel Information -->
    <USER USERNAME="mmeyer"
    USERTYPE = "SITE"
    ACTIVESTATE = "TRUE"
    DELETESTATE = "FALSE"
    FIRSTNAME = "Marianne"
    LASTNAME = "Meyer"
    DISPLAYNAME = "Marianne Meyer"
    TITLE = ""
    HOMESCREENURL = "./Custom/HomeDefault.html"
    PHONE = "(555) 555-1212"
    FAX = "(555) 555-1212"
    ALTPHONE = ""
    EMAIL = "[email protected]"
    ADDRESS = ""
    ADDRESS2 = ""
    CITY = ""
    STATE = ""
    ZIPCODE = ""
    COUNTRY = ""
    BEEPER = ""
    USERMUSTRESETPASSWORD = "FALSE"
    DESCRIPTION = ""
    PASSWORD="changeme"/>
    <USER USERNAME="john"
    USERTYPE = "SITE"
    ACTIVESTATE = "TRUE"
    DELETESTATE = "FALSE"
    FIRSTNAME = "John"
    LASTNAME = "Meyer"
    DISPLAYNAME = "John Meyer"
    TITLE = ""
    HOMESCREENURL = "./Custom/HomeDefault.html"
    PHONE = "(555) 555-1212"
    FAX = "(555) 555-1212"
    ALTPHONE = ""
    EMAIL = "[email protected]"
    ADDRESS = ""
    ADDRESS2 = ""
    CITY = ""
    STATE = ""
    ZIPCODE = ""
    COUNTRY = ""
    BEEPER = ""
    USERMUSTRESETPASSWORD = "FALSE"
    DESCRIPTION = ""
    PASSWORD="changeme"/>
    <!-- Insert Site Information -->
    <SITE NAME=     "(01) Massachusetts General Hospital" MNEMONIC="01"
    ADDRESS = "1 Main Street"
    ADDRESS2 = ""
    CITY = "Boston"
    STATE = "MA"
    ZIPCODE = ""
    COUNTRY = "USA"
    PHONE = "(555) 555-1212"
    ALTPHONE = ""
    FAX = ""
    EMAIL = ""
    TIMEZONE="(GMT-05:00) Eastern Time (US & Canada)"
    SITEDATEFORMAT = "MONTH_DAY_YEAR"
    STARTDATE = "April 1, 2005">
    </SITE>
    <SITE NAME=     "(02) Boston General Hospital" MNEMONIC="01"
    ADDRESS = "1 Main Street"
    ADDRESS2 = ""
    CITY = "Boston"
    STATE = "MA"
    ZIPCODE = ""
    COUNTRY = "USA"
    PHONE = "(555) 555-1212"
    ALTPHONE = ""
    FAX = ""
    EMAIL = ""
    TIMEZONE="(GMT-05:00) Eastern Time (US & Canada)"
    SITEDATEFORMAT = "MONTH_DAY_YEAR"
    STARTDATE = "April 1, 2005">
    </SITE>
    <!-- Insert SITE and User Mapping Information -->
    <SITEGROUP SITENAME="(01) Massachusetts General Hospital">
    <USERREF USERNAME="mmeyer"/>
    </SITEGROUP>
    <SITEGROUP SITENAME="(02) Boston General Hospital">
    <USERREF USERNAME="John"/>
    </SITEGROUP>
    <!-- Insert User ROle Information -->
    <RIGHTSGROUP GROUPNAME="CRA">
    <!-- Insert Rights -->
    <RIGHTREF RIGHT="Print"/>
    <RIGHTREF RIGHT="Monitor"/>
    <RIGHTREF RIGHT="Canned Reports"/>
    <RIGHTREF RIGHT="View CRF"/>
    <RIGHTREF RIGHT="View Signature History for CRF"/>
    <RIGHTREF RIGHT="View Signature History for CRB"/>
    <RIGHTREF RIGHT="Data Export Listings"/>
    <RIGHTREF RIGHT="Freeze a CRF"/>
    <RIGHTREF RIGHT="Unfreeze a CRF"/>
    <RIGHTREF RIGHT="Mark and Unmark a CRF as SVed"/>
    <RIGHTREF RIGHT="Freeze a CRB"/>
    <RIGHTREF RIGHT="Unfreeze a CRB"/>
    <RIGHTREF RIGHT="Change Query State from Candidate to Open"/>
    <RIGHTREF RIGHT="Change Query State from Candidate to Deleted"/>
    <RIGHTREF RIGHT="Change Query State from Answered to Closed"/>
    <RIGHTREF RIGHT="Change Query State from Open to Closed"/>
    <RIGHTREF RIGHT="Change Query State from Reissued Candidate to Closed"/>
    <RIGHTREF RIGHT="Enter Query in Candidate State"/>
    <RIGHTREF RIGHT="Enter Query in Open State"/>
    <RIGHTREF RIGHT="Re-issue Query in Candidate State"/>
    <RIGHTREF RIGHT="Re-issue Query in Open State"/>
    <RIGHTREF RIGHT="Navigate by Visit"/>
    <RIGHTREF RIGHT="Navigate by Form"/>
    <RIGHTREF RIGHT="Reordering of Patients"/>
    <!-- Insert Users for role -->
    <USERREF USERNAME="mmeyer"/>
    <USERREF USERNAME="john"/>
    </RIGHTSGROUP>
    </MEDMLDATA>
    now i need to generate XML based on the above SAMple XML file,can anybody tell me how to generate XML file based on this..and after generating it should be validated against the registerd schema.

    Maybe I am wrong, but my understanding is that you have to generate the xml from your data source (usually tables) and then you validate it against your schema. I don't know if the schema has a magic that can generate the xml for you. Is that correct? Anyone please? At the beginning, I asked a .Net guy if his tool could "generate" an xml simply using the schema (I thought so). But he said they had to use many style sheets to create the xml.
    Ben

  • Generating XML from dual

    Hey Gurus,
    I'm trying to generate the following XML from dual, however, I keep getting an error message stating my top level is not defined. Any ideas? Thanks!
    <PUDOOUTPUT>
    <PKG>
    <SHIPMENTID>12345</SHIPMENTID>
    <ERROR>'NO DATA'</ERROR>
    <ERRORTEXT>'Error: Cannot find shipper alias in SPL_SHIPPER_ACCOUNTS.'</ERRORTEXT>
    </PKG>
    </PUDOOUTPUT>
    select xmlelement("PUDOOUTPUT",xmlelement("PKG",xmlelement("SHIPMENTID",i.shipmentid),
    xmlelement("ERROR",'NO DATA'),
    xmlelement("ERRORTEXT",'Error: Cannot find shipper alias in SPL_SHIPPER_ACCOUNTS.')))
    into p_wms_output
    from dual;

    Hi,I need to generate XML FIle.Since i m new to XML.
    I had toregister the valid schema in my DB now i want to generate the XML file and with the refernce to this schema that xml file should be validated one against that schema.
    things i hav done till now
    ->i hav registered the scehma
    and the sample XML file provided by client
    <?xml version="1.0"?>
    <MEDMLDATA xmlns="PhaseForward-MedML-Inform4">
    <!-- Insert Trial/Study Information -->
    <STUDYVERSION UUID="id"
    STUDYNAME="name"
    VERSIONDESCRIPTION="text" />
    <!-- Insert Site Personnel Information -->
    <USER USERNAME="mmeyer"
    USERTYPE = "SITE"
    ACTIVESTATE = "TRUE"
    DELETESTATE = "FALSE"
    FIRSTNAME = "Marianne"
    LASTNAME = "Meyer"
    DISPLAYNAME = "Marianne Meyer"
    TITLE = ""
    HOMESCREENURL = "./Custom/HomeDefault.html"
    PHONE = "(555) 555-1212"
    FAX = "(555) 555-1212"
    ALTPHONE = ""
    EMAIL = "[email protected]"
    ADDRESS = ""
    ADDRESS2 = ""
    CITY = ""
    STATE = ""
    ZIPCODE = ""
    COUNTRY = ""
    BEEPER = ""
    USERMUSTRESETPASSWORD = "FALSE"
    DESCRIPTION = ""
    PASSWORD="changeme"/>
    <USER USERNAME="john"
    USERTYPE = "SITE"
    ACTIVESTATE = "TRUE"
    DELETESTATE = "FALSE"
    FIRSTNAME = "John"
    LASTNAME = "Meyer"
    DISPLAYNAME = "John Meyer"
    TITLE = ""
    HOMESCREENURL = "./Custom/HomeDefault.html"
    PHONE = "(555) 555-1212"
    FAX = "(555) 555-1212"
    ALTPHONE = ""
    EMAIL = "[email protected]"
    ADDRESS = ""
    ADDRESS2 = ""
    CITY = ""
    STATE = ""
    ZIPCODE = ""
    COUNTRY = ""
    BEEPER = ""
    USERMUSTRESETPASSWORD = "FALSE"
    DESCRIPTION = ""
    PASSWORD="changeme"/>
    <!-- Insert Site Information -->
    <SITE NAME= "(01) Massachusetts General Hospital" MNEMONIC="01"
    ADDRESS = "1 Main Street"
    ADDRESS2 = ""
    CITY = "Boston"
    STATE = "MA"
    ZIPCODE = ""
    COUNTRY = "USA"
    PHONE = "(555) 555-1212"
    ALTPHONE = ""
    FAX = ""
    EMAIL = ""
    TIMEZONE="(GMT-05:00) Eastern Time (US & Canada)"
    SITEDATEFORMAT = "MONTH_DAY_YEAR"
    STARTDATE = "April 1, 2005">
    </SITE>
    <SITE NAME= "(02) Boston General Hospital" MNEMONIC="01"
    ADDRESS = "1 Main Street"
    ADDRESS2 = ""
    CITY = "Boston"
    STATE = "MA"
    ZIPCODE = ""
    COUNTRY = "USA"
    PHONE = "(555) 555-1212"
    ALTPHONE = ""
    FAX = ""
    EMAIL = ""
    TIMEZONE="(GMT-05:00) Eastern Time (US & Canada)"
    SITEDATEFORMAT = "MONTH_DAY_YEAR"
    STARTDATE = "April 1, 2005">
    </SITE>
    <!-- Insert SITE and User Mapping Information -->
    <SITEGROUP SITENAME="(01) Massachusetts General Hospital">
    <USERREF USERNAME="mmeyer"/>
    </SITEGROUP>
    <SITEGROUP SITENAME="(02) Boston General Hospital">
    <USERREF USERNAME="John"/>
    </SITEGROUP>
    <!-- Insert User ROle Information -->
    <RIGHTSGROUP GROUPNAME="CRA">
    <!-- Insert Rights -->
    <RIGHTREF RIGHT="Print"/>
    <RIGHTREF RIGHT="Monitor"/>
    <RIGHTREF RIGHT="Canned Reports"/>
    <RIGHTREF RIGHT="View CRF"/>
    <RIGHTREF RIGHT="View Signature History for CRF"/>
    <RIGHTREF RIGHT="View Signature History for CRB"/>
    <RIGHTREF RIGHT="Data Export Listings"/>
    <RIGHTREF RIGHT="Freeze a CRF"/>
    <RIGHTREF RIGHT="Unfreeze a CRF"/>
    <RIGHTREF RIGHT="Mark and Unmark a CRF as SVed"/>
    <RIGHTREF RIGHT="Freeze a CRB"/>
    <RIGHTREF RIGHT="Unfreeze a CRB"/>
    <RIGHTREF RIGHT="Change Query State from Candidate to Open"/>
    <RIGHTREF RIGHT="Change Query State from Candidate to Deleted"/>
    <RIGHTREF RIGHT="Change Query State from Answered to Closed"/>
    <RIGHTREF RIGHT="Change Query State from Open to Closed"/>
    <RIGHTREF RIGHT="Change Query State from Reissued Candidate to Closed"/>
    <RIGHTREF RIGHT="Enter Query in Candidate State"/>
    <RIGHTREF RIGHT="Enter Query in Open State"/>
    <RIGHTREF RIGHT="Re-issue Query in Candidate State"/>
    <RIGHTREF RIGHT="Re-issue Query in Open State"/>
    <RIGHTREF RIGHT="Navigate by Visit"/>
    <RIGHTREF RIGHT="Navigate by Form"/>
    <RIGHTREF RIGHT="Reordering of Patients"/>
    <!-- Insert Users for role -->
    <USERREF USERNAME="mmeyer"/>
    <USERREF USERNAME="john"/>
    </RIGHTSGROUP>
    </MEDMLDATA>
    now i need to generate XML based on the above SAMple XML file,can anybody tell me how to generate XML file based on this..and after generating it should be validated against the registerd schema.

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

  • How to generate WPF Xaml through XSD (xml schema definition)

    Hi Experts
    I am working on Projects where we need to generate wpf ui (xaml) at runtime as per different requirements. We are trying to generate xaml from xsd file. We are able to generate UI from xml but as size of xml can be large we are reluctant to use xml as xaml
    generation source. I am attaching a sample image what we are trying to do
    UI elements Description
    For each complex node in xsd, we need a panel which can have add or delete button depending on minoccurs and maxoccurs of the node. Inside panel we want to add different ui elements.
    Please suggest if there is any way to do this or any one have worked in this direction?
    Thanks
    Praveen

    I should think you could use xsl on xsd to generate xaml.
    I have used xsl on xml to do this sort of thing - for reporting style stuff. 
    Xsd is just an odd kind of xml so I should think that's do-able.
    Failing that.
    You could use the template approach and generate xml from that but use c# to read the xsd.
    You would have like a textbox template etc.
    Is that UI truly representative?
    You could leverage the approach I use in this:
    http://social.technet.microsoft.com/wiki/contents/articles/29777.wpf-property-list-editing.aspx
    The EditRow user control has label + editing control as a pair.
    You would add another control for that pattern thing I see in grey after some of those.
    But you could essentially iterate the fields in an xsd , decide what control to use based on field type. 
    Set the label....
    Add that to a Listbox.
    You have a big bunch of xsd and you're thinking of generating the UI?
    I suppose you could then use icustomtypeprovider to generate matching viewmodels inheriting some base vm functionality.
    I don't follow how a "supporting dll" comes into this.
    Could you explain?
    Hope that helps.
    Recent Technet articles:
    Property List Editing ;  
    Dynamic XAML

  • Issues in generating xml from Report Builder as per XSD provided

    Hi,
    We are provided with XSD's for each report. Now we need to generate XML's from report that are as per the XSD's provided to us.
    But the problem come's when we have to define hirearchies.
    Like for example
    1. Our Report is based on the following query:
    SELECT DISTINCT '' as DUMMY
    ,               fil.file_number
    ,      TO_CHAR (TO_DATE (RTRIM (LTRIM (fil.processing_date)), 'YYDDD'),'DD-MM-YY') Processing_Dt
    , rp_bsu.service_user_number
    , rp_bsu.service_user_name
    ,     rp_ac.account_number
    , rp_ac.account_name
    ,     rp_ac.account_type
    ,     rp_ac.sortcode
    , NVL(ovr_lmt.account_section_value,0) AS
    account_section_value
    ,     NVL(ovr_lmt.overlimit_amount,0) AS overlimit_amount1
    , (NVL(ovr_lmt.overlimit_amount,0) - NVL(ovr_lmt.account_section_value,0)
    ) value_to_date
    , (NVL(ovr_lmt.overlimit_amount,0) -
    NVL(lmt_usg.limit_amount,0)
    ) amount_overlimit
    , ovr_lmt.over_limit_id, NVL(lmt_usg.limit_amount,0) AS
    limit_amount
    , lmt_usg.period_type,lmt_usg.currency
    FROM v_rp_bacs3day_service_user rp_bsu,
    v_rp_bacs_service_office rp_bso,
    v_rp_account rp_ac,
    t_file fil,
    t_over_limit ovr_lmt,
    t_limit_usage lmt_usg
    WHERE rp_bso.handling_bank_code = :p_scheme_member
    AND rp_bsu.sponsoring_bank_code = rp_bso.owning_bank_code
    AND rp_ac.service_user_number = rp_bsu.service_user_number
    AND rp_bsu.service_user_number = fil.originator
    AND fil.status <> 'R'
    AND fil.processing_date = (SELECT cycle_date
    FROM t_cycle
    WHERE status = 1)
    AND lmt_usg.account_id = rp_ac.account_id
    AND ovr_lmt.limit_usage_id = lmt_usg.limit_usage_id
    AND TO_CHAR (ovr_lmt.exceeded_date, 'DD-MM-YYYY') =
    (SELECT TO_CHAR (TO_DATE (RTRIM (LTRIM (cycle_date)),
    'YYDDD'),'DD-MM-YYYY')
    FROM t_cycle
    WHERE status = 1)
    2.The hierarchy as per xsd that we need to define is :
    <ServiceUserAccount>
    <ServiceUser>
         <Name></Name>
    <Number></Number>
    </ServiceUser> <SortCode></SortCode>
    <AccountNumber></AccountNumber>
    <NearOrOverLimitDetail>
    <AccountType></AccountType>
    <ProcessingDate></ProcessingDate>
    …………………..(there is a list of elements below it)
    </NearOrOverLimitDetail>
    </ServiceUserAccount>
    In the xsd for the complex element type “ServiceUser” we need to display Service User Name and Number. For this I created a separate query Q2 in reports and joined it using data link with the parent Q1(which has data grouped on processing date) . So that it can be displayed as a separate element parallel to other elements like Sort code ,Account Numbers. But when we generate XML for this, then tags for Q2 query donot appear in xml.
    And we get this hierarchy with missing Service User element
    <ServiceUserAccount>
    <SortCode></SortCode>
    <AccountNumber></AccountNumber>
    <NearOrOverLimitDetail>
    <AccountType></AccountType>
    <ProcessingDate></ProcessingDate>
    …………………..(there is a list of elements below it)
    </NearOrOverLimitDetail>
    </ServiceUserAccount>
    Please let me know if you have any solution to implement this ASAP as its very urgent.
    Thanks & Regds
    Anuradha.

    Hi,
    We are provided with XSD's for each report. Now we need to generate XML's from report that are as per the XSD's provided to us.
    But the problem come's when we have to define hirearchies.
    Like for example
    1. Our Report is based on the following query:
    SELECT DISTINCT '' as DUMMY
    ,               fil.file_number
    ,      TO_CHAR (TO_DATE (RTRIM (LTRIM (fil.processing_date)), 'YYDDD'),'DD-MM-YY') Processing_Dt
    , rp_bsu.service_user_number
    , rp_bsu.service_user_name
    ,     rp_ac.account_number
    , rp_ac.account_name
    ,     rp_ac.account_type
    ,     rp_ac.sortcode
    , NVL(ovr_lmt.account_section_value,0) AS
    account_section_value
    ,     NVL(ovr_lmt.overlimit_amount,0) AS overlimit_amount1
    , (NVL(ovr_lmt.overlimit_amount,0) - NVL(ovr_lmt.account_section_value,0)
    ) value_to_date
    , (NVL(ovr_lmt.overlimit_amount,0) -
    NVL(lmt_usg.limit_amount,0)
    ) amount_overlimit
    , ovr_lmt.over_limit_id, NVL(lmt_usg.limit_amount,0) AS
    limit_amount
    , lmt_usg.period_type,lmt_usg.currency
    FROM v_rp_bacs3day_service_user rp_bsu,
    v_rp_bacs_service_office rp_bso,
    v_rp_account rp_ac,
    t_file fil,
    t_over_limit ovr_lmt,
    t_limit_usage lmt_usg
    WHERE rp_bso.handling_bank_code = :p_scheme_member
    AND rp_bsu.sponsoring_bank_code = rp_bso.owning_bank_code
    AND rp_ac.service_user_number = rp_bsu.service_user_number
    AND rp_bsu.service_user_number = fil.originator
    AND fil.status <> 'R'
    AND fil.processing_date = (SELECT cycle_date
    FROM t_cycle
    WHERE status = 1)
    AND lmt_usg.account_id = rp_ac.account_id
    AND ovr_lmt.limit_usage_id = lmt_usg.limit_usage_id
    AND TO_CHAR (ovr_lmt.exceeded_date, 'DD-MM-YYYY') =
    (SELECT TO_CHAR (TO_DATE (RTRIM (LTRIM (cycle_date)),
    'YYDDD'),'DD-MM-YYYY')
    FROM t_cycle
    WHERE status = 1)
    2.The hierarchy as per xsd that we need to define is :
    <ServiceUserAccount>
    <ServiceUser>
         <Name></Name>
    <Number></Number>
    </ServiceUser> <SortCode></SortCode>
    <AccountNumber></AccountNumber>
    <NearOrOverLimitDetail>
    <AccountType></AccountType>
    <ProcessingDate></ProcessingDate>
    …………………..(there is a list of elements below it)
    </NearOrOverLimitDetail>
    </ServiceUserAccount>
    In the xsd for the complex element type “ServiceUser” we need to display Service User Name and Number. For this I created a separate query Q2 in reports and joined it using data link with the parent Q1(which has data grouped on processing date) . So that it can be displayed as a separate element parallel to other elements like Sort code ,Account Numbers. But when we generate XML for this, then tags for Q2 query donot appear in xml.
    And we get this hierarchy with missing Service User element
    <ServiceUserAccount>
    <SortCode></SortCode>
    <AccountNumber></AccountNumber>
    <NearOrOverLimitDetail>
    <AccountType></AccountType>
    <ProcessingDate></ProcessingDate>
    …………………..(there is a list of elements below it)
    </NearOrOverLimitDetail>
    </ServiceUserAccount>
    Please let me know if you have any solution to implement this ASAP as its very urgent.
    Thanks & Regds
    Anuradha.

  • Problem generating XML data file through XSD

    Hello there,
    I'm trying to generate an XML data file as per the below steps:
    Making a normal schema in query transform.
    Mapping desired source column into query schema.
    Right click on query transform and generating XML schema (XSD) in my local system.
    In object library XML file format adding the XSD with schema as a root element.
    Creating target instance from object library XML file.
    In target file specifying file creation path in my local system. 
    After performing above steps and executing the job getting below error.
    Any help on this will be much appreciated.
    Regards,
    Jagari

    I found some code looking at a similar issue - I don't know how to recover other data (in I guess) the rest of the HTML in the code. I need to find a better reference with details and examples.
    I fixed it by changing:
        ssDebug.trace(moreStuff.xliff.file.body.trans-unit); // - error
    to:
       ssDebug.trace(moreStuff.file.body['trans-unit']); //- no error
    with expected output (no error):
    <trans-unit id="001" resname="IDS_ZXP7_JAM_01">
      <source>If, while you are printing, your printer stops, ...</source>
    </trans-unit>
    <trans-unit id="002" resname="IDS_ZXP7_JAM_02">
      <source>look at the Operator Control Panel (OCP) for the fault description.</source>
    </trans-unit>
    <trans-unit id="003" resname="IDS_ZXP7_JAM_03">
      <source>If the fault is a card jam, open and close the Print Cover (or Options Cover).</source>
    </trans-unit>
    <trans-unit id="004" resname="IDS_ZXP7_JAM_04">
      <source>The printer will initialize and move the jammed card to the Reject Bin.</source>
    </trans-unit>
    <trans-unit id="005" resname="IDS_ZXP7_JAM_TITLE">
      <source>Card Jam</source>
    </trans-unit>

Maybe you are looking for

  • Communication between a driver and application.

    Communication between a driver and application. I am writing a driver for a PCI card. I have found very good examples of how the driver should be build. Where do I find the information about how the user mode application should be talking the driver.

  • Write to file(AVI) synchronizate data

    I receive a USB Camera signal and a CAN(Control Area Network) signal. I like two signal parallel displaying and write to file (one or more) and after read. I practise IMAQ AVI Write Frame.vi with DATA. I receive USB Camera signal around 15fps (but th

  • Putting OSX on Second Internal Drive Macbook Pro

    I am curious and hopefully somoene who has a bit more knowledge on this can help me out, so I have 2 internal drives on my Macbook pro a SSD in the main bay and a 750 GB HHD in the superdrive bay - so boot camp still dosen't ( to my knowledge) allow

  • HTML Toolbar in Email Compose with Java WebDynPro

    Hi Friends, We are working on a email functionality requirement and we are having a requirement to add a toolbar in the Email Compose Box. For ex. that toolbar contains Bold, Italic, Underline, and other HTML stuff. i.e. to decorate the text in compo

  • The quantity on asset 0722 10001267-0  will become negative from this posting

    Hi All, while trying to reverse the document through AB08 for an asset, system was throwing an error message. Quantity will become negative. i have checked in the asset master record the quantity field value is 0. i am surprised why the system was re