Generate XML Schema

Can I generate XML schema from a existing xml file?

Hi,
i have tried the stylus studio to generate XSD from XML but it does not generate all the tags for e.g the maxlength. is there any way to generate a XSD from an XML query

Similar Messages

  • Problem with XML import MDM 7.1 - Can't generate Xml Schema

    Hi All,
    When I try to open an XML file using Import manager, I'm getting some errors, as detailed below. I mention that I'm using MDM 7.1.
    The first error I received was the following:
    "Can't open C:/Program files/SAP MDM 7.1/Import Manager/XSD.exe". I copied the file xsd.exe in the Import Manager folder, as suggest here:
    Re: Import Manager Error.
    Afterwards, I received a new error:
    "Can't generate Xml Schema for: C:/Program files/SAP MDM 7.1/Import Manager/filename.xml"
    If anyone has faced the same problem - and solved it -, could you please help me find the reason for this behaviour?
    Regards,
    Laura

    Hi Laura,
    The error message "Can't generate Xml Schema"  might be related to DTD. the XML file has a directive for loading DTD.
    MDM doesnot support DTDs.
    Remove the DTD line and make sure there is only one root element in the XML file and try again.
    Hope this helps,
    Bes t Regards,
    Silpa Chillakuru

  • Unable to Generate XML Schema

    Hi all,
               When i add a sales order it's giving an error like "Couldn't Generate XML schema"....can anybody pls give me some suggestions....i have tried all the possibilities but unable to rectify this error...
    <?xml version="1.0"?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Body>
    <env:Fault>
    <env:Code>
    <env:Value>env:Receiver</env:Value>
    <env:Subcode>
    <env:Value>-2053</env:Value>
    </env:Subcode>
    </env:Code>
    <env:Reason>
    <env:Text xml:lang="en">Could not Generate XML Schema</env:Text>
    </env:Reason>
    <env:Detail>
    <Object>oDocuments</Object>
    <Object>oDocuments</Object>
    <ObjectIndex>1</ObjectIndex>
    <Command>AddObject</Command>
    <SessionID>2789C3B9-2E34-EC45-4F44-9E5F224CF30D</SessionID>
    </env:Detail>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    My coding for adding a sales order is given below:--
    Private Sub btnClick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClick.Click
            Dim oQuotationXml As Xml.XmlElement
            Dim oBpCode As Xml.XmlNodeList
            Dim oDocNo As Xml.XmlNodeList
            Dim oItemCode As Xml.XmlNode
            Dim oDocDate As Xml.XmlNode
            Dim oItemQuantity As Xml.XmlNode
            Dim oDocumentLines As Xml.XmlNode
            oQuotationXml = DIS.GetEmptySalesXml(SessionID)
            oDocNo = oQuotationXml.SelectNodes("//DocEntry")
            oDocNo.Item(0).InnerText = "29"
            oBpCode = oQuotationXml.SelectNodes("//CardCode")
            oBpCode.Item(0).InnerText = "C3456" 
            oDocDate = oQuotationXml.SelectSingleNode("//DocDueDate")
            oDocDate.InnerText = "20080909"
            oItemCode = oQuotationXml.SelectSingleNode("//ItemCode")
            oItemCode.InnerText = "A00006"
            oItemQuantity = oQuotationXml.SelectSingleNode("//Quantity")
            oItemQuantity.InnerText = "2"
            txtTmp.Text = oQuotationXml.OuterXml
            DIS.AddSalesOrder(SessionID, oQuotationXml.OuterXml)
    regards,
    shangai.

    Hi Mohan,
    I am facing a similar issue in creating XML from IDOC for MATMAS05, can you tell me how you fixed the issue? I am unable to follow your above comment about started with '\' in root? Can you tell me where was this please?
    Thanks.
    Manish

  • Generating xml schema?

    Hi,
    What are the procedures I must take to generate an XML schema? I would like to do this from PL/SQL directly, and just see a printout of the xml document direcly within SQLPLUS.
    Are there any xml schema-specific commands that come with Oracle 9, just to generate xml schemas?
    Please let me know,
    Thanks!

    Yes,
    Please have a look at XSU. Using the classes provided there, you can generate a schema according to the table.
    Hope this helps.

  • Generate XML Schema from oracle tables

    I am new to xml...We have a requirement to generate xml schemas for one or more oracle tables...Are there any tools availaible in oracle?.....I have tried xml spy which generates the schema but i want it like a batch process probably without user intervention...

    An XML document may be generated from a database table with XSU.
    http://www.devx.com/xml/Article/32046

  • Generate XML Schema from Oracle Database

    Is there a utility that would allow our team to generate XML Schemas directly from existing Oracle databases? Or do you have a suggestion on how to achieve this?
    Thank you.

    Hey, The Schema Processor is available in the Technologies section on this site. Just download it and see the samples. You will get the way for doing it. If you are having problems then just call me.
    Bye.
    null

  • Can you generate XML schema from XMLDB?

    I have not used XMLDB and don´t read the entire doc about the product(sorry for that).
    I got the following question, is it possible to generate a XML schema from relational data through XMLDB? Or is this best done via a third party software like XMLSpy or alike?

    3rd Party Software...
    We can generate a schema for an object Hierarchy but our considered opinion is that there is no sensible way to generate an XML Schema representation of a purely relational data structure. It requires a tool which allows you to make decisions on how to organize the heirarchy.

  • Generate XML Schema from Java classes?

    Hi,
    Considering an XML Mapping, i would like to generate a default XML Schema from my Java class.
    Is there a tool in toplink (10.1.3) to do that or does anyone have an easy way to generate this XML schema?
    Thanks,
    Ludovic

    Hi Ludovic,
    We don't have support for schema generation from Java classes in TopLink 10.1.3. It's required for JAXB 2.0 so it will be available in a future release.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                           

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

  • Creating XML Schema from tables With Constraints

    Greetings,
    I'd have an interesting question. I finally am getting familiar with the various kinds of xml solutions provided by the oracle database, but hey here I have another interesting question I can't seem to get into life. I'm currently generating XML Schemas (XSD) from the tables of my database. Its nice its cool however I'd need to have the table's constraints with the xsd:elements also. And heres my problem, I can't seem to insert the table constrains. I'll show you what I mean:
    <xsd:element name="MESSAGE_TABLE">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="MESSAGE_RECORD">
            <xsd:complexType>
              <xsd:all>
                <xsd:element name="ID" type="xsd:integer" minOccurs="1" />
                <xsd:element name="HEADER">
                  <xsd:simpleType>
                    <xsd:restriction base="xsd:string>
                      <xsd:maxLength value="255" />
                    </xsd:restriction>
                  </xsd:simpleType>
                </xsd:element>
              </xsd:all>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>
      <!-- I'd need some more things here like... -->
      <!-- Primary key(s) -->
      <xsd:key name="PK_ID_PRIM">
        <xsd:selector xpath="." />
        <xsd:field xpath="ID" />
      </xsd:key>
      <!-- Foreign key(s) -->
      <xsd:keyref name="FK_HEADER_FOREIGN" refer="PK_HEADER_ID">
        <xsd:selector xpath="HEADER" />
        <xsd:field xpath="ID" />
      </xsd:keyref>
      <!-- Unique constraint(s) -->
      <xsd:unique name="UQ_..." ... />
      </xsd:unique>
    </xsd:element>That would fit my business needs, however I may be so blind that I can't see the forest from the tree. Currently I got so far that:
              xmlElement
                  "xsd:schema",
                  xmlAttributes
                      'http://www.w3.org/2001/XMLSchema'      as "xmlns:xsd"
                  xmlElement
                    "xsd:element",
                    xmlAttributes
                      target_table                            as "name"
                    xmlElement               
                      "xsd:complexType",
                      xmlElement
                        "xsd:sequence",
                        xmlElement
                          "xsd:element",
                          xmlAttributes
                            target_table || '_RECORD'         as "name",
                            'unbounded'                       as "maxOccurs"
                          xmlElement
                            "xsd:complexType",
                            xmlElement
                              "xsd:sequence",
                                xmlAgg(ELEMENT)
                    xmlElement
                      "xsd:Key",
                )As you can see this won't be good since I have put a single xml element in there. I guess I'd need something more like an xmlAgg(CONSTRAINTS), however in that case I'm wondering how will the select's FROM part look like.
      FROM
        SELECT  table_name, internal_column_id,
                CASE
                  WHEN data_type IN ('VARCHAR2', 'CHAR')
                  THEN
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
                      xmlElement
                        "xsd:simpleType",
                        xmlElement
                          "xsd:restriction",
                          xmlAttributes
                            'xsd:string' as "base"
                          xmlElement
                            "xsd:maxLength",
                            xmlAttributes
                              DATA_LENGTH as "value"
                  WHEN data_type = 'DATE'
                  THEN
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        'xsd:date' as "type",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
                  WHEN data_type = 'NUMBER'
                  THEN
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        decode(DATA_SCALE, 0, 'xsd:integer', 'xsd:double') as "type",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
                  ELSE
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        'xsd:anySimpleType' as "type",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
        end ELEMENT
        FROM user_tab_cols c
        WHERE TABLE_NAME = target_table
        ORDER BY internal_column_id
      GROUP BY TABLE_NAME;Thank you very much for all your help!
    Regards,
    Joey
    Edited by: Wrath#87 on 2012.09.05. 22:15

    Thanks for that, answer. That helped me a lot managing primary constraints. However I still have problems managing foreign keys. I come up with the following formula:
              xmlElement
                  "xsd:schema",
                  xmlAttributes
                      'http://www.w3.org/2001/XMLSchema'      as "xmlns:xsd"
                  xmlElement
                      "xsd:element",
                      xmlAttributes
                          upper(target_table) as "name"
                      xmlElement
                          "xsd:complexType",
                          xmlElement
                            "xsd:all",
                                xmlAgg(ELEMENT)
                          SELECT    xmlElement
                                      "xsd:key",
                                      xmlattributes
                                        uc.constraint_name as "name"
                                      xmlElement
                                        "xsd:selector",
                                        xmlattributes
                                          '.' as "xpath"
                                      xmlAgg
                                        xmlElement
                                          "xsd:field",
                                          xmlattributes
                                            ucc.column_name as "xpath"
                                        order by ucc.position
                          FROM      user_constraints uc
                                    JOIN      user_cons_columns ucc
                                    ON        ucc.constraint_name   =   uc.constraint_name
                          WHERE     uc.table_name                   =   upper(target_table)
                          AND       uc.constraint_type              =   'P'
                          GROUP BY  uc.constraint_name
                          SELECT    xmlElement
                                        "xsd:keyRef",
                                        xmlattributes
                                            a.constraint_name as "name"
                                        xmlElement
                                            "xsd:selector",
                                            xmlattributes
                                                c.table_name as "xpath"
                                        xmlAgg
                                            xmlElement
                                                "xsd:field",
                                                xmlattributes
                                                    d.column_name as "xpath"
                                            order by  c.table_name
                          FROM      all_constraints   a,
                                    all_cons_columns  b,
                                    all_constraints   c,
                                    all_cons_columns  d
                          WHERE     a.constraint_name   =   b.constraint_name
                          AND       a.constraint_name   =   c.r_constraint_name
                          AND       c.constraint_name   =   d.constraint_name
                          AND       a.table_name        =   upper(target_table)
              )This gives me the following error message: 00937. 00000 -  "not a single-group group function"

  • Xml schema different between Dev and QA

    The XML schemas are different between our DEV and QA systems after applying XI stack 13/SRM stack 10. It may be that they were different before applying the stacks but it has only been spotted in testing. We need to find out why before we live with the SP stack into production.
    We have re-applied the XI content tpz files to both the DEV and QA servers and can't see any differences between in the design time repository apart from between the generated XML schemas:
    A simple example of the difference is included below. The difference
    only seem to be in the SRM Server 5.5 content and seems to be to do with the hierarchies in the header declaration with xmlns:p0="http://sap.com/xi/SRM/Basis/Global" being in a different position in Dev than in QA. I have raised an OSS message but have been waiting for 2 1/2 days now for a response and we are due to go live with the patching in a weeks time. Any help steering me in the right direction would be most appreciated.
    Dev:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:p0="http://sap.com/xi/SRM/Basis/Global"
    xmlns="http://sap.com/xi/SAPGlobal/Global"
    targetNamespace="http://sap.com/xi/SAPGlobal/Global">
    <xsd:import namespace="http://sap.com/xi/SRM/Basis/Global" />
    <xsd:element name="PurchaseOrderRequest"
    type="p0:PurchaseOrderMessage" />
    </xsd:schema>
    QA:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://sap.com/xi/SAPGlobal/Global"
    targetNamespace="http://sap.com/xi/SAPGlobal/Global">
    <xsd:import namespace="http://sap.com/xi/SRM/Basis/Global" />
    <xsd:element xmlns:p0="http://sap.com/xi/SRM/Basis/Global"
    name="PurchaseOrderRequest" type="p0:PurchaseOrderMessage" />
    </xsd:schema>
    Many thanks
    Ian

    Like I have mentioned in my reply yesterday to your another post, I am very positive that the role you are looking at in your QA system is the role "Accessible Content Administration".
    Please verify your role assignment and make sure that you have the correct roles assigned.
    Thanks,
    Shanti

  • 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

  • XML Schema to generate table data from a repeating subform data

    Hi All, I would like to have a check box that when checked, will hide a quotation form, and make a purchase order form visible, carrying over some of the field data from the quotation form into a new table on the Purchase order form. I've attached this form at https://workspaces.acrobat.com/?d=pqpsXx5VPi*LkMeVKrX57w if you would like to take a look. When the checkbox is unchecked, it will hid the PO form, and make the quite form visible.
    The idea behind this is that my client will create his quote and send t to his customer. Once the customer accepts the quote, he can just click a button to generate his purchase order that he will send to his supplier.
    It seems that because I've got buttons to add rows on the quote form that the problem is more complex. I would be able to do this myself if the table had a fixed number of rows and I was able to use global fields and naming each cell something different, but beacuse it's a single repeating subform, I can't seem to make it work at all.
    I understand that because its a repeating subform that I need to create an XML schema to accomplish this, but also can't figure out for the life of me how to actually create the schema. I've been reading tons of tutorials, but no clue how to apply it to my specific need. I have only been able only find info on how to bind the data source once it's been created.
    I would be forever grateful if anyone could help me out.
    Thank you!

    I've edited your form and put it here.
    Here's what I've done:
    Inserted script into your checkbox renamed Accpted that hides/shows the Purchase Order/ Sales Quotation
    I've included a scripting object with a function I wrote to transfer data from like named fields/subforms from one section to another
    Inserted a few common fields into your Purchase Order table
    What you need to do is complete the development of your Purchase Order table. Make sure the common fields between the quote and purchase tables have the same names in order to transfer the data.
    No schema necessary.
    Kyle

  • 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

  • XML Schema Generated By XMLSpy fails validation in JDev 10.1.3.0.4

    Hi gurus,
    I am trying to view an XML schema generated by XMLSpy in JDev 10.1.3.0.4 but got this error:
    Error(6,74): <Line 6, Column 74>: XML-24523: (Error) Invalid value 'simpletypes\AmendmentReasonChargeType.xsd' for attribute: 'schemaLocation'
    Now in the XML schema, there is this line that causes the above error:
    <xs:include schemaLocation="simpletypes\AmendmentReasonChargeType.xsd"/>
    The same XML schema can be opened in Visual Studio 2003 OK. Could anyone help me out here? Thank you!
    Ben

    There is a tool tip that displays over the line that causes the error and this is what it says,
    value of attribute schemaLocation not of anyURI type. The value must be of the following type:
    Type Name: anyURI Primitive Type: anyURI
    What does it mean?
    Thanks
    Ben

Maybe you are looking for

  • Logic Pro 9.1.8 crashes when started

    I need help! My Logic Pro 9.1.8 crashes every time I try to open it and I think it has something to do the old Melodyne essential I installed. I tried to delete Melodyne with no luck, it still crashes... Here's the crach log: Process:         Logic P

  • Oracle AS Adapter for SAP R/3

    Hello everyone. I have some questions abuot the Oracle AS Adabter for SAP. I have to get values out of miniSAP and integrate them in a BPEL Process. In SAP there is a function to generate a Webservice out of a BAPI for example! This Web Service I wan

  • Problem with AT^SJOTAP command using Siemens TC65

    I am trying to use OTAP to install a jar file onto a TC65 module using the AT^SJOTAP command. I have the jar and jad file on my server, and when I issue the AT command I can see the jad file being read but that's as far as it gets before timing out.

  • Recommended deployment topologies

    Hello, I've read the "Recommended deployment topologies" for Oracle AS 10g Release 2. There's mentioned that HTTPS-to-HTTP protocol conversion should preferably be handled by a load balancer. Is there a document describing HOW TO configure Oracle AS

  • Hello.I ve accidentally deleted one of my folder in my tabs in safari.How can i retrieve it.Regards.

    Hello.I ve accidentally deleted one of my folder in my tabs in safari.How can i retrieve it.Regards.