How to generate an XML file following a XSD schema

hi, i have a XML Schema (.xsd) and i have to generate automatically the structure of the XML according to the XSD Schema.I have been searching on the internet and found some solutions using XMLBeans and JAXB, but that`s not exactly what i am looking for. I use JDOM to parse XML and i'd wish to use only Jdom to generate XML if it's possible....Thank's

Dear All,
Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
string strXmlFile = "testXmlExport.xml";
myDataSet.WriteXmlSchema(strSchemaFile);
myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
but how do I export the .xml file so that is conforms with the .xsd format?
If any of you have worked this out the answer would be most appreciated.
All the best,
Nick
"Everything should be made as simple as possible, but not simpler" - Einstein

Similar Messages

  • How to generate an XML file for an animation of IK armature

    Can someone please tell me how to generate an XML file for an animation of IK armature.
    I have a 5 keyframe/16 frame animation of a human character made up of a series of moveiclip symbols that is animated with an IK armature.  I need the XML information from the animation. 
    When I go to Commands > Export Motion XML I get the error message "There is more than one object on frame 1" and then nothing happens.
    Thank you,
    c

    I hope that's not the case.  I want to write to adobe about it.  I think it's a great feature and it functions really well even though it is not a very developed IK tool.  My biggest issue with it is ouput options and integration with motion tweens.
    I have seen a lot of examples of animators using it online, just no one talked about output.  I just feel it hasn't been developed.  It can generate a sprite sheet but only for a single pose frame of the animation, and not all the key frames or pose tweens.  I find that functionality quite odd, as if adobe just forgot about IK when added in sprite sheets, etc. and the reason it half works is just an accident.

  • How to generate an XML file from SSIS (based on an XSD)?

    I have an XSD that describes an XML format. I also have a sample XML file as well from the XSD. I am trying to understand SSIS's capability to generate the XML file in an ETL process. I would need to create the XML file based on the XSD that
    I have. It is safe to assume that all the data elements are in the DB that I am incorporating in the ETL and it is also safe to assume that the data in the XML may be from multiple different tables (so massaging is probably necessary). 
    Would this be a job for C#/VB or can I do this through an SSIS process/task? Please help me understand my options. Thanks.

    Dear All,
    Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
    data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
    string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
    string strXmlFile = "testXmlExport.xml";
    myDataSet.WriteXmlSchema(strSchemaFile);
    myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
    but how do I export the .xml file so that is conforms with the .xsd format?
    If any of you have worked this out the answer would be most appreciated.
    All the best,
    Nick
    "Everything should be made as simple as possible, but not simpler" - Einstein

  • How to generate an XML file

    Hi,
    How do we generate an XML file from data in an internal table.
    Regards
    Rani

    Hi Rani,
    Take a look at thread:
    XML to ABAP
    Regards,
    John.

  • How to generate a XML file from a XML schema...?

    Hi guys...!
    I have a XML schema and I want to write a XML file based on that schema. I have heard about this feature that eclipse has, which given a XML schema, can generate a XML file for you.
    Does anyone of you know about this feature? or is there another way to do it. The schema that I have is very huge...
    I will really appreciate any help from you guys...
    Thank...you..
    --- Spirit Away...

    don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=649205&tstart=10

  • How to generate this xml file?

    Dear experts,
         Could you please tell me how to generate to below xml file? 
    <?xml version="1.0" encoding="utf-8" ?>
    - <faxmakerdata>
    - <RECIPIENTS>
    - <FAX>
    - <RECIPIENT>
      <FIRSTNAME>><![CDATA[]]></FIRSTNAME>
      <LASTNAME><![CDATA[]]></LASTNAME>
      <COMPANY><![CDATA[]]></COMPANY>
      <DEPARTMENT><![CDATA[]]></DEPARTMENT>
      <EMAILADDRESS><![CDATA[]]></EMAILADDRESS>
      <NUMBER><![CDATA[2937]]></NUMBER>
      <VOICENUMBER><![CDATA[]]></VOICENUMBER>
      </RECIPIENT>
      </FAX>
      </RECIPIENTS>
      </faxmakerdata>
    I have used  "SDIXML_DATA_TO_DOM  " but there will appear <Item>
    could you please tell me how to do?

    Hi,
        after SDIXML_DATA_TO_DOM  fm Use SDIXML_DOM_TO_XML to  convert DOM to XML
        then u can use any download file FM .
      DATA:
        TABLESTATS           LIKE MSSTABSIZEINFO,
        IVALUE               TYPE I,
        BEGIN OF VERSIONTAB OCCURS 0,
          VERSIONDAT         LIKE SY-DATUM,
        END OF VERSIONTAB,
        CMD(384)             TYPE C,
        XML_AS_STRING        TYPE     XSTRING,
        DOCUMENT             TYPE REF TO IF_IXML_DOCUMENT,
        DOM                  TYPE REF TO IF_IXML_ELEMENT,
        TABLENAME(128)       TYPE C,
        RC                   TYPE SY-SUBRC,
        L_EXISTS             LIKE DD02L-ACTFLAG.
    convert table to a DOM
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
          NAME        = 'spinfo'
          DATAOBJECT  = SPINFO[]
        IMPORTING
          DATA_AS_DOM = DOM
        CHANGING
          DOCUMENT    = DOCUMENT
        EXCEPTIONS
          OTHERS      = 01.
      IF SY-SUBRC = 0.
        CALL METHOD DOCUMENT->APPEND_CHILD
          EXPORTING
            NEW_CHILD = DOM
          RECEIVING
            RVAL      = RC.
        IF RC = 0.
        convert DOM to XML
          CALL FUNCTION 'SDIXML_DOM_TO_XML'
            EXPORTING
              DOCUMENT      = DOCUMENT
              PRETTY_PRINT  = 'X'
            IMPORTING
              XML_AS_STRING = XML_AS_STRING
              SIZE          = IVALUE
            TABLES
              XML_AS_TABLE  = XML_AS_TABLE
            EXCEPTIONS
              OTHERS        = 2.
          IF SY-SUBRC = 0.
            MOVE XML_AS_STRING TO XML_AS_STRING_OUT-XML_STRING.
            MOVE IVALUE TO XML_AS_STRING_OUT-LENGTH.
          ENDIF.
        ENDIF.
      ENDIF.
    Salil...

  • How to generate an xml file from a soapbody

    i'm trying to use SOAPMESSAGE from a webservice as a Datasource for my JasperReport, I'm thinking of doing it as getting the SOAPBody and saving it as xml file and setting that xml file as datasource to my JasperReport. My problem is how will a get the SOAPBody and save it as an xml file? or is there other way to make SOAP from webservice as a datasource for my Jasperreport?
    Thanks in advance for your help.

    Dear All,
    Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
    data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
    string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
    string strXmlFile = "testXmlExport.xml";
    myDataSet.WriteXmlSchema(strSchemaFile);
    myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
    but how do I export the .xml file so that is conforms with the .xsd format?
    If any of you have worked this out the answer would be most appreciated.
    All the best,
    Nick
    "Everything should be made as simple as possible, but not simpler" - Einstein

  • How to generate a xml file with JSP?

    Hi,
    I want to dynamically generate maths formula in my web page. I think MathMl is a good choice. However, it needs xml file. I try to use JSP to generate the
    content of the xml file. However, it doesn't work. What should I do?
    Best regards.

    Hi,
    Thanks a lot for your replies. I used to write JSP to present quiz fetching from a database. To use MathML, xml file has to be used. I've tried to copy the content of the xml file to a jsp file and let the brower to display it. However, it doesn't work. I view the content of the page displayed by the brower. I simply contain nothing. So what it's the most convenience way to present the MathML dynamically.
    Best regards.
    From hoifo

  • How to generate the XML file to HTML?

    Hi all,
    I am new to XML.
    Can I somehow see the HTML-Output of the XML-File, when I have the XSL-File too, but don't use any XML-Editor (XMLSpy) and FOP? I do not want use any additional tools - only the database tools.
    What I need for this?
    Do I need the XSLT-File too?
    ============================
    My test.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="test.xsl"?>
    <ROW num="1">
         <TABLE_NAME>ABR_ART_ABR_DAU_MATRIX</TABLE_NAME>
         <TABLESPACE_NAME>PS2000_STAMM</TABLESPACE_NAME>
         <PCT_FREE>10</PCT_FREE>
         <INI_TRANS>1</INI_TRANS>
         <MAX_TRANS>255</MAX_TRANS>
         <INITIAL_EXTENT>516096</INITIAL_EXTENT>
         <NEXT_EXTENT>65536</NEXT_EXTENT>
         <MIN_EXTENTS>1</MIN_EXTENTS>
         <MAX_EXTENTS>2147483645</MAX_EXTENTS>
         <PCT_INCREASE>0</PCT_INCREASE>
         <LOGGING>YES</LOGGING>
         <BACKED_UP>N</BACKED_UP>
         <NUM_ROWS>33</NUM_ROWS>
         <BLOCKS>20</BLOCKS>
         <EMPTY_BLOCKS>0</EMPTY_BLOCKS>
         <AVG_SPACE>0</AVG_SPACE>
         <CHAIN_CNT>0</CHAIN_CNT>
         <AVG_ROW_LEN>100</AVG_ROW_LEN>
         <AVG_SPACE_FREELIST_BLOCKS>0</AVG_SPACE_FREELIST_BLOCKS>
         <NUM_FREELIST_BLOCKS>0</NUM_FREELIST_BLOCKS>
         <DEGREE> 1</DEGREE>
         <INSTANCES> 1</INSTANCES>
         <CACHE> N</CACHE>
         <TABLE_LOCK>ENABLED</TABLE_LOCK>
         <SAMPLE_SIZE>33</SAMPLE_SIZE>
         <LAST_ANALYZED>1/8/2004 11:45:1</LAST_ANALYZED>
         <PARTITIONED>NO</PARTITIONED>
         <TEMPORARY>N</TEMPORARY>
         <SECONDARY>N</SECONDARY>
         <NESTED>NO</NESTED>
         <BUFFER_POOL>DEFAULT</BUFFER_POOL>
         <ROW_MOVEMENT>DISABLED</ROW_MOVEMENT>
         <GLOBAL_STATS>YES</GLOBAL_STATS>
         <USER_STATS>NO</USER_STATS>
         <SKIP_CORRUPT>DISABLED</SKIP_CORRUPT>
         <MONITORING>NO</MONITORING>
         <DEPENDENCIES>DISABLED</DEPENDENCIES>
         <COMPRESSION>DISABLED</COMPRESSION>
    </ROW>
    ============================
    ============================
    My test.xsl-file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <head>
    <title>Test XSL ALL_TABLES</title>
    </head>
    <body>
    <xsl:for-each select="ROW">
    <h2>Tabelle: <xsl:value-of select="TABLE_NAME"/></h2>
         <hr/>
         <table border="1" cellpadding="0">
                             <tr>
                             <td><xsl:value-of select="TABLESPACE_NAME"/></td>
                             <td><xsl:value-of select="PCT_FREE"/></td>
                             </tr>
                        </table>
              </xsl:for-each>          
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    ============================
    I am waiting for your answers, when possible with examples please.
    Regards
    Leonid Pavlov

    XSLT to convert the XML document to Html:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <head>
    <title>Test XSL ALL_TABLES</title>
    </head>
    <body>
    <table border="1" cellspacing="0">
    <tr>
    <th>TABLE NAME</th>
    <th>TABLESPACE NAME</th>
    <th>PCT FREE</th>
    </tr>
    <xsl:for-each select="ROW">
    <tr>
    <td><xsl:value-of select="TABLE_NAME"/></td>
    <td><xsl:value-of select="TABLESPACE_NAME"/></td>
    <td><xsl:value-of select="PCT_FREE"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

  • How generate a XML file & how to save data in that file?

    hi,
    How to generate an xml file & how to add data in that xml file? is there anyone who can help me about this? Firstly i need to open a xml file and after that i need to save user data in that file? how i will do it? What will be the solution of this? please give me solution........
    with regards
    Bina

    With an API like Xerces you can parse an XML document into a DOM tree. You can do modifications on that tree manually and then write it back out as XML data.
    http://xerces.apache.org/xerces2-j/

  • How I could generate an XML file from a report in version 4.0B

    Good morning,
    How could I generate an XML file from a report? Please note that I am using version 4.0B
    I don't have access to
    Billy Vital

    Hi,
            In the Class CL_XML_DOCUMENT,
                 we have a method  EXPORT_TO_FILE to download an XML file.

  • How do we create generate webservices.xml file?

    Hi all,
    Im new to webservices...
    im able to generate mapping.xml file using wsgenerate
    but i dont know how do we generate webservices.xml.
    Im waiting for ur reply.
    http://tech.groups.yahoo.com/group/completeJava/
    http://tech.groups.yahoo.com/group/completeJava/messages
    http://completejava-group.blogspot.com/

    You use the web interface of xmlsidecar generator made by Johannes Henseler and the push the button there "generate". Copy paste that into a plain text file and then change tex extension from txt to xml. That's how you do a sidecar.xml the easy way.
    Afterwards, yo've got to import "multiple files" (or "many files"... my DPS is a Spanish one) from Folio Builder.
    If the folder are structured properly, folio builder will start swallowing the data of sidecar and uploading the articles.
    Right now, while posting this, my pc is doing that with about one hundred articles. As happy and busy as a beaver in heat
    Gustavo (Posting from Madrid)

  • How to automatically generate build.xml file in eclipse?

    Hello every body,
    I am learning about ANT. e.g I have writen a very simple programme which displays output "no worries". But how can I compile it with ANT and how can I generate build.xml file using eclipse.

    This is not really a Java issue but rather is an Eclipse issue. You may wish to look for their support sites or forums.

  • In SAP-XI stop generating of xml files

    Hi,
    In sap-xi i created a simple file to file scenario. After completion
    of end to end scenario the xml files are keep on generating. I have selected delete option in CommunicationChannel. The xml  file from source folder is deleted. Still the taget xml is generating in Destination folder.
    How to stop the generating of xml files
    Any one tell me the solution for this.
    Thanks,
    Ram

    Hi,
    Do the Following,
    1) Make sure that you deleted all the Files present in Source Directory
    2)Select the Processing mode as Delete.
    3)Now Place the File in the Source DIR path
    4)See Whether the file got deleted from the Source or not.
    5) Check the Sender CC in RWB
    6) Check the SXMB_MONI to get the Success Flag.
    7) Check the Receiver CC in RWB.
    8) Check the Receiver Directory whether received the file or not.
    Please check  these one-by-one
    Regards
    Seshagiri

  • How to generate an XML Document from XQuery

    The following query returns me the required XML output. However, I need to generate an XML Document out of it. How do I go about generating an XML Doc?.
    SELECT XMLQuery('<Data>
    {for $tert in ora:view("DATA"),
               $tert_audit in ora:view("DATA_AUDIT")
           let $tert_cmd_id := $tert/ROW/ID/text(),
               $tert_spouse_name := $tert/ROW/SPOUSE_NAME/text(),
               $tert_directions := $tert/ROW/DIRECTIONS/text(),
               $tert_soil_zone := $tert/ROW/SOIL_ZONE/text(),
               $tert_audit_cmd_id := $tert_audit/ROW/ID/text(),
               $tert_audit_trans_date := $tert_audit/ROW/TRANSACTION_DATE/text()
               where $tert_cmd_id = $tert_audit_cmd_id and
               $tert_audit_trans_date >= xs:date(V_Last_Successful_Date)
               order by $tert_cmd_id
           return
           <op>
             <op_type>I</op_type>
             <ent_id>{$tert_cmd_id}</ent_id>
    <source>S</source>
    <fg>
    <val_flds>
    <fld>
    <id>spouse_name</id>
    <val>{$tert_spouse_name}</val>
    </fld>
    <fld>
    <id>directions</id>
    <val>{$tert_directions}</val>
    </fld>
    <fld>
    <id>soil_zone</id>
    <val>{$tert_soil_zone}</val>
    </fld>
    </val_flds>
    </fg>
    </op>}</Data>' RETURNING CONTENT)
    INTO V_Other_Insert
    FROM dual;

    Hi Geoff,
    I would like to generate an XML file which contains data as shown below:
    <Insert>
    <result>
    <type>A</type>
    <id>1</id>
    <date>11/11/2006</date>
    <source>Web</source>
    </result>
    </Insert>
    I'm using the below given query for this purpose:
    SELECT XMLQuery('<Insert>
    {for $c in ora:view("TableA")
           let $id := $c/ROW/ID/text(),
               $code := $c/ROW/CODE/text(),
               $type := $c/ROW/TYPE/text(),
               $date := $c/ROW/DATE/text()
           return
           <result>
             <type>{$type }</type>
    <id>{$id}</id>
    <date>{$date}</date>
    <source>S</source>
    </result> }</Insert>' RETURNING CONTENT)
    INTO V_Insert
    FROM dual;
    V_Insert stores the required result.
    How do I save this result to a XML Document?
    Please help.

Maybe you are looking for

  • Reg: passing totals /subtotals of a ALV to a smartform

    I have a editable ALV report which has a button to call a smartform . Once the user edits some  fields I need to pass the refreshed total to the smartform.  I want to know - in what structure the totals/subtotals  of the ALV report are stored.

  • Customer balances in Group Currency

    Is there any way to get the Customer balances in Group currency - I am running TC S_ALR_87012172 for a UK Company Code. This TC provides me balances and details in GBP only and does not provide the option to get my USD balances. Is there any other tr

  • Container variables in Alert monitoring

    Hello I am having interfaces without BPM and I am trying to use container variables facility for that. I defined the container variable in the transaction ALRTCATDEF in which I gave element name same as one of the element from payload. My alerts are

  • Problem with ORACLE database

    Hi all, I am facing some problem with ORACLE database while configuring one JDBC scenario in the receiver side. I have configured one JDBC scenario like FILE TO JDBC. As JDBC is at receiver side i have provided the input file with the following forma

  • Does Siri in iPhone 4S works offline, without 3G or Wi-Fi?

    Can I use Siri without Wi-Fi or 3G, or is it ok if i use normal GPRS connection from the service provider?? Or does Siri also works offline??