XSD structure

Hi,
I want to create form designer using XSD document. The idea is like load XSD file, retrieve the structure, display structure in some ui and allow user to select elements
and place in designer window.
Hence I want to retrieve tree structure from XSD file. The XSD may contain any possible elements, types as defined in W3C Schema.
Is anyone aware of any API that can help to get the structure.
For more details refer following xsd
<?xml version=...?>
<schema....>
<element name="person">
<complexType>
<all>
<element name="firstName" type="string"></element>
<element name="lastName" type="string"></element>
<element name="company" type="tns:companyType"></element>
</all>
</complexType>
</element>
<complexType name="companyType">
<all>
<element name="name" type="string"></element>
<element name="address" type="string"></element>
<element name="zipcode" type="string"></element>
</all>
</complexType></schema>
The output will be similar to following
person
-firstName
-lastName
-company
-name
-address
-zipcode

curiousmind wrote:
Forgot to mention DOM parser will not help me. You know how complex XSD can be, the example i have given is very hypothetical.
The elements and its types can be nested by any hierarachy.Huh?
An XSD is a valid XML file. By definition.
Thus DOM can very assuredly create and parse an XSD. Along with anything else that can deal with XML in general way.

Similar Messages

  • Content conversion-source XSD structure

    hi expert,
             I am doing content conversion from pdf to xml using content master studio.I have export the XSD file from source or target message type(IR). I have completed IR and ID including module configuration for transformation. now i am import the XSD file in content conversion master studio. also deployment was completed.I put the deployment folder under content master engine(c:\programfiles\SAP\ContentAgent\ServiceDB).but source(pdf) file is not polling from sender communication channel.
    my doubt is " XSD structure was different while generaing from XI(IR) machine" its given unique id for each element. also alert message comes" the namespace http://www.w3.org/2001/XMLschema already carries a different alias" while import the XSD file in conversion master studio.

    The problem is with XDS File, use same file for Conversion Program and Design Interfaces.
    Sandeep

  • How to export an Idoc to a XSD structure

    Hi,
    How do you export an Idoc with data, to a XSD structure where we can see the data structured by segments?
    Thanks in advance.
    Luís Teixeira.

    Hi,
    We don't have already the development environment to do this. I'm at Blueprint fase, and I would like to see the structured data, to do the data mappings, because I'm not sure if this Idoc have the data needed.
    Can we do that on SAP machine?
    Thanks,
    Luis

  • Not able to deplicate subtree from xsd structure

    Hi All,
    Currently i am doing a Message Mapping in PI 7.0. My source structure is an IDOC and my target structure is from an XSD.
    When i try to duplicate a particular field, the field is not shown after i save the mapping. It throws an error "skipping mapping". I tried by mapping the duplicated fields and by not mapping also, still it does not shows the fields after saving the mapping.
    Someone kindly help me in this.
    Regards,
    Sherin Jose

    >
    Dheeraj Kumar wrote:
    > Hi
    >
    > we do field duplication in the source side only am i right or wrong.
    >
    > Regards
    > Dheeraj Kumar
    Wrong!! we do it at target side.

  • IMAP Sender channel, Content Conversion Module , target XSD structure issue

    Hi,
    I'm using the content conversion adapter module in my IMAP senderchannel , to transform a flat file into a IDOC ORDERS05 structure.
    I have some difficulties generating the right structure... how can I make a more deep structure ?
    My output is like this. All created segment is on the same level.
    <ORDERS05>
        <IDOC>
            <E1EDK01>
            <E1EDK03>
            <E1EDKA1>
            <E1EDK02>
            <E1EDKT1>
            <E1EDKT2>
            <E1EDKT2>
            <E1EDKT1>
            <E1EDKT2>
            <E1EDKT2>
        <IDOC>
    </ORDERS05>
    Here the E1EDKT2 should be a "level under" or "sub structure" to E1EDKT1, and not on the same level !
    The wanted result:
    <ORDERS05>
        <IDOC>
            <E1EDK01>
            <E1EDK03>
            <E1EDKA1>
            <E1EDK02>
            <E1EDKT1>
                <E1EDKT2>
                <E1EDKT2>
            <E1EDKT1>
                <E1EDKT2>
                <E1EDKT2>
        <IDOC>
    </ORDERS05>
    How can I solve this ????

    Hi,
    you can do it on adapter level too:
    but you cannot do it in standard content conversion I guess
    (if it has more then 2 levels)
    check this how you can do it:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/482aae19-0301-0010-3485-8efd618818d0
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • IDOC - XI - IDOC scenario. I can't import XSD to Data Type

    Helo!
    I have some problem with creating data tape. I have to create data type similar to IDOC structure which i imported from SAP system. Similar becouse in this DT I need to add some more elements. Becouse the IDOC structure is large I wont to import IDOC structure to this DT automaticly. I try to eksport XSD structure of my IDOC and then import to data type but i can read the monit:
    The tag <element> is not allowed at <<xsd:schema><xsd:element><xsd:element>>.
    I'm beginer in XSD so I don't now how to change this file.
    Can somebody help me on that or explain whot I can do to make this DT.
    Thanks for answer!

    Hi,
    U can import the IDoc XSD to External defination and use it in your Message Mapping and Interfacing Mapping.
    There is no need to create a data type of message type for IDoc.
    External Defination
    <b>External Definition</b> enables you to import a local WSDL, XSD, or DTD file to the Integration Repository and specify which parts of the schema to be used as a description for a message.
    U can use this ED as
    1.Inbound/Outbound in the Message Interface.
    2.Source/Target structure for the Message Mapping.
    In a scenario If there is a necessitity for changing the Occurance of some segment of the IDOC steps u perform is.
    1.Import the IDoc to XI.
    2.Export the IDoc(i.e XSD format) and save it to the local machine.
    3.Make changes to the IDoc structure by modifying the XSD file in the local machine.
    4.Save it as an XSD file Itself.
    5.Import the XSD file in the IR under the External Defination.
    6.Use this XSD in your Message Interface/Mapping which is same as IDoc structure but with some changes that u have made.
    Go Thru this Blog <a href="/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change Bundling - Trick without BPM</a> BY Michal Krawczyk where the Occurance of the IDoc is changed to 1...Unbounded from 1...999999999 by using the XSD.
    Regards
    Santhosh
    <a href="Remember to set the thread to solved when you have received a solution to set the thread to solved when you have received a solution</a>
    Use a Good Subject Line, One Question Per Posting - Award Points

  • Creation of XSD from XML

    Hi SDN,
    Can anybody guide me to solve this problem.
    I have created a custom repository as per the requirement(repository has text fields, taxonomy fields etc). I have created a XSD structure using xomLite from the XML(by exporting from Console).
    Now if I open the XSD I am finding only a Category field but the attributes that were created in Datamanager are not present.
    I want an XSD with attrbutes , please help me out.
    Very urgent.
    Regrads,
    Pramod

    Creating XSD with attributes:
    since attributes are created in Data mgr they are not part of data structure which we define in console hence the xsd from console will not have attributes. you can create an xml file from MDM syndicator with all the attributes and from that xml file convert to XSD using the software.
    I want to syndicate all the attributes
    since we dont have the xsd while syndicating we need to add all attributes first then do the mapping.how to add fields in the xsd in syndicator Manager pls refer the ref guide for MDM Syndicator.
    hope it helps.reward points if suitable
    Regards-
    Ravi

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

  • Converting string xml to xsd format ?

    Hi,
    my web service receives a xml as an input in string format.
    it is passed to other web services for processing purpose.
    during execution of each web service, I need to extract some node values multiple times which causes performance overhead.
    can I convert the input xml (as string) into xsd structure (similar to OTD) so that I can simply map it while passing it to other web services? it should save me unnecessary extraction of same nodes in other web services.
    how to do it?
    is there any better approach for this?
    suraj

    Within the JBI environment, the XML message is typically passed around as a DOM Document (wrapped as a TRAX DOMSource), so the document is parsed only once. This should be very quick, even when evaluating XPath functions to find parts of the document repeatedly. DOM and OTD aren't that dissimilar, so you should be comfortable with it.
    When sending the XML message "across the wire", you are forced to serialize to XML again. This is the foundation of interoperability and loose coupling.
    Sometimes converting the XML to a more convenient form (different schema) can help make it easier/quicker to run queries against.

  • WSDL - s:any handling & string to structure

    Hi,
    We have a WSDL supplied to us by a partner, generated by Visual Studio. Helpfully it doesnt actually declare or include the XSD structures within the Type definitions.  There are 2 scenarios (examples below) that I need to deal with.
    1) They declare the xml as a string so this will need to be converted to a structure and passed to an appropriate MI. (in the BPE so that errors are handled).
    2) They declare the structure as <s:any /> which is valid WSDL but not so helpful to XI as it doesnt know what to do with it. 
    If I define TheRequest and TheResponse from the WSDL in a Mapping then I can only see as far as TheRequestXML and TheResponseXML, no deeper.  I can see no Node operation to map 1 field to a whole structure.
    It would be possible to do this in XSLT or a Java Mapping but that seems like the wrong way of going about this as it cant be that uncommon an occurance.
    The XSD does not have any visibility of the methods in the WSDL (TheRequest / TheRequestXML etc). 
    I can work around this by hacking the WSDL to include & use the types in the XSD explicitly, but that again seems wrong.
    Namespace is defined
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.somewhere.com/">
          <s:element name="TheRequest">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="TheRequestXML" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="TheResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="TheResponseXML">
                  <s:complexType mixed="true">
                    <s:sequence>
                      <s:any />
                    </s:sequence>
                  </s:complexType>
                </s:element>
              </s:sequence>
            </s:complexType>
          </s:element>
        </s:schema>
      </wsdl:types>
    Thanks
    James

    The message structure is defined in 2 parts:
    WSDL
      +--> XSD
    When someone calls the Soap Sender and sends over some data (a SOAP message) and this contains a structure like:
    <some method>
    <some top level soap / wsdl node>
    .... importing or including
      <some top level xsd node>
       <rest of structure>
    The maps then map any of the above nodes as the MI's use the top level soap methods.  The problem is that unless the WSDL explicitly defines the Type from the XSD (rather than using s:any or just sticking it in a string) then the fields are not visible to any maps.
    I agree it's not ideal, but hey I didnt design the WSDL
    I just want to know how to handle these 2 scenarios and map the s:any and string to the (known) XSD structure so it may be used as normal in a further map.
    Cheers
    James

  • XML validation against registered XSD

    I have registered XSD into oracle database, while validating xml against this xsd I got stuck with non-mandatory tags.
    Below is the tag-XSD structure:
    Status field as String:
    <xs:element name="Status" nillable="false"> <xs:annotation> <xs:documentation>Values are 'N' or 'E'</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="1"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    idnumber tag field as Integer:
    <xs:element name="idnumber" type="xs:int" nillable="false">
    <xs:annotation>
    <xs:documentation>id value </xs:documentation>
    </xs:annotation>
    </xs:element>
    As status tag is of string type and I have mentioned it as nillable = "False", but even though when I am passing this tag as <status/>, then also its validating xml.... but as i mentioned nillable property as false then it should not validate it ..... please correct me if i m wrong..
    In case of idnumber tag it is of int type. In this case <idnumber/> will not work in either case even it is nillable = true or false. Means we cannt pass null values in integer field..... right?
    Please suggest me how to make tag of string datatype as not nillable.
    Is there any significance of using nillable = "false" in int datatype tag. Means if we want to make it as optional then need to mention it as minoccurs = 0..... is it correct?
    Requirement is simple:
    Just want to make some tag as optional and some as mandatory, tag can be of integer or string type.
    Thanks in advance.....
    Edited by: 959352 on 15-Oct-2012 00:45

    As status tag is of string type and I have mentioned it as nillable = "False", but even though when I am passing this tag as <status/>, then also its validating xml.... but as i mentioned nillable property as false then it should not validate it ..... please correct me if i m wrong.. The nillable attribute doesn't work that way. It's easy to look that up in any tutorial.
    nillable = "true" means you allow the element to have a NULL content (different from empty string) by specifying an explicit null attribute :
    <Status xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>nillable = "false" is the default behaviour.
    Please suggest me how to make tag of string datatype as not nillable.
    Is there any significance of using nillable = "false" in int datatype tag. Means if we want to make it as optional then need to mention it as minoccurs = 0..... is it correct?
    Requirement is simple:
    Just want to make some tag as optional and some as mandatory, tag can be of integer or string type. You have to be careful about the vocabulary.
    In my mind, an "optional" element means you can omit it entirely in the instance document (minOccurs="0"), whereas an empty element means the start tag and end tag are there but with no content.
    There are multiple ways to allow for empty or non-empty elements.
    e.g. for a non-empty string :
    <xs:minLength value="1"/>or, as in your example, if the content is actually constrained to a list of values, use enumerations.
    xs:int datatype doesn't allow empty values (unless you use xsi:nil).
    A possible solution is to build a new type by unioning (xs:union) an xs:int and an empty string type.

  • Xsd to string conversion

    Hi Sapall.
    i have got a tricky situation on an IDOC to webservice Interface where the requirement is after getting the data from IDOC to Webservice xsd  structure ,PI need to convert the same xsd into a single element containing a XML string .so that the single element will be sent to reciever webservice.
    so can any one help me in getting this solution in providing either java mapping code or UDF and how to do to achieve this.
    your answer would be appreciated.
    regards.
    Varma .

    Hi Varma ,
    On which Version of PI you are working ?
    If it is PI 7.1, please refer the below link.
    /people/jyothi.anagani/blog/2010/06/17/convert-the-input-xml-to-string-in-pi-71-using-standard-graphical-mapping
    Else..
    Refer This..   http://wiki.sdn.sap.com/wiki/display/XI/JavaMapping-ConverttheInputxmlto+String
    OR
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Thanks.

  • Manage multiple structure mapping

    Hello all,
    i have a scenario MAIL -> PI -> MAIL.
    I am working with standard XSD with multiple external references and namespaces for my outbound and inbound structureq. All messages have different structures that i cannot merge because of different namespace untouchable.
    I have a Sender Mail Adapter in order to read my mailbox with an interface filling in it.
    I know the interface i need to use only when i am reading a specific field in the mail attachment.
    My problem is that the interface in the CC refers to one Interface mapping while i need something dynamic. I cannot use also condition in receiver determination or interface determination due to my standard structure.
    I would like something to allow me to choose what Interface mapping i use... I recall that each XSD structure are different, this is the main problem for me.
    It must be a way to do it but i don't find it, someone got an idea ?
    Thanks,
    Jean-Philippe

    OK, if you always have the same receiver, you should give the condition in the interface determination. On which PI version are you working?
    In fact PI doesn't care as much about real fitting interface structures as long as you do not wish to do validation or so. You just have to configure things right. E.g. you can chose as interface the IDoc WBBDLD04, but you give the PI an INVOIC01. If you just transport the message, nobody cares.
    Now, if you read the mails from your mailbox with a dummy interface, you actually don't know, what's in your message. You're sending the message always to the same receiver system, so you don't have to give any condition here. Now in interface determination, you give all the interfaces that possibly could be on the inbound side. For each interface you now have to put a condition, where you check with an xpath expression, if it is maybe a WBBDLD04 or an INVOIC01 or a DELVRY03 or whatever you have to check.

  • Handling Recursive include in XSD

    Hi Experts,
         I 'am trying to create a java client proxy for my WSDL. My XSD "includes" 3 other xsds that have recursive imports among them due to which the client proxy generation results in an infinite loop eventually leading to a StackOverFlowException. This happens in Axis 1.2 and jdeveloper as far as I 've tested. Though I heard the latest versions of these tools do support recursive include handling, I would like to get rid of this recursive include so that it can be used to generate client proxy in most available tools.
    Here is my usecase:
    TestEmployee.WSDL
    <xsd:schema>
    <xsd:import namespace="http://xmlns.oracle.com/apps/fnd/framework/svctoolbox/samplelib" schemaLocation="http://<host>/<path>/TestEmployeeService.xsd"/>
    </xsd:schema>
    TestEmployeeService.xsd:
    =============================
    <xsd:include schemaLocation=A.xsd/>
    <xsd:include schemaLocation=B.xsd/>
    <xsd:include schemaLocation=C.xsd/>
    A.xsd
    ===================================
    <xsd:include schemaLocation=C.xsd/>
    B.xsd
    ===================================
    <xsd:include schemaLocation=A.xsd>
    <xsd:include schemaLocation=C.xsd>
    C.xsd
    =====================================
    <xsd:include schemaLocation=B.xsd>
    The xsd structures are such that the include can not be ignored. Any suggestions on how to break the loop in this recursion would be immensely helpful.
    Thanks,
    Ganapathi

    Have a look at Matt Wrights Blog, where he covers something similar http://blogs.oracle.com/matt/
    Cheers!

  • XSD Validation with ABAP XML Parser?

    Hello there,
    i'm loading xml files into a R/3 System. This all works fine with the standard XML Parser.
    The XML Files are based on a .xsd structure that is assigned to each file with a external link.
    To be sure that the xml document conforms to this .xsd structure i would like to check against it.
    For that i would like to hold a .xsd structure string in my abap programm.
    How can this be accomplished? Is this possible anyway?
    Greetings and many thanks.
    Kay

    check out the class
    CL_XML_SCHEMA
    Regards
    Raja

Maybe you are looking for

  • I want to clean up unnecessary files from my Imac Pc ?

    I have my Mac for over 5 years and never done a clean up, is about time i am sure  i have stuff that could be deleted is an Imac with a Power Pc and running Leopard i would apriciated if someone can help me,apple wants to charge me by the hour, since

  • I am unable to convert certain files to pdf with Adobe Acrobat 8 Professional

    I am unable to convert Word & PowerPoint files to pdf.  (I am able to convert image files & excel) I have enable macros in Word and still cannot convert the file.  I am getting the error popup: Unable to open the document Please check to see if you h

  • "Read from Binary File" and efficiency

    For the first time I have tried using Read from Binary File on sizable data files, and I'm seeing some real performance problems. To prevent possible data loss, I write data as I receive them from DAQ, 10 times per second. What I write is a 2-D array

  • Can I use built-in iSight camera with other apps?

    Can I use built-in iSight camera with other apps? How? doesn't work in imovie or image capture

  • Can not reinstall Photoshop cs2 upgrade

    I physically changed my hard drive and thought I had copied all relevant files, but I know have to reinstall CS2 upgrade and it is looking for my old serial number.  I have the Photoshop 5.5 discs, but not the past serial numbers. How can I now insta