IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Creating TypeTree for XML Input and Output

    Posted 03/17/09 10:18 AM

    Originally posted by: anjaliSN


    Hi,

    Could anyone provide me an example to create a type tree for a nested xml structure?

    I am struggling a lot to structure it.

    thanks.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Creating TypeTree for XML Input and Output

    Posted 03/17/09 10:20 AM

    Originally posted by: Greenspan


    Do you have an XSD for it ?
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Creating TypeTree for XML Input and Output

    Posted 03/17/09 10:22 AM

    Originally posted by: Daniel_MK


    Don't do it manually, import the XSD.

    If you don't have one, create one with Liquid XML Studio or similar then import that!

    Daniel.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Creating TypeTree for XML Input and Output

    Posted 03/17/09 10:24 AM

    Originally posted by: anjaliSN


    No, I dont have the xsd. The XML structure looks like this

    <Data>
    <Request id="12" timeout="1000">
    <Source id="21" name="test"/>
    <Destination id="33" name="destTest"/>
    </Request>
    </Data>
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 5.  Re: Creating TypeTree for XML Input and Output

    Posted 03/17/09 10:36 AM

    Originally posted by: Daniel_MK


    Your XSD should look something like this

    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="Data">
    <xs:sequence maxOccurs="unbounded">
    <xs:element name="Request">
    <xs:complexType>
    <xs:complexContent mixed="false">
    <xs:extension base="Request">
    <xs:attribute name="id" type="xs:int" />
    <xs:attribute name="timeout" type="xs:int" />
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Data" type="Data" />
    <xs:complexType name="Request">
    <xs:sequence>
    <xs:element name="Source">
    <xs:complexType>
    <xs:attribute name="id" type="xs:int" />
    <xs:attribute name="name" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element name="Destination">
    <xs:complexType>
    <xs:attribute name="id" type="xs:int" />
    <xs:attribute name="name" type="xs:string" />
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 6.  Re: Creating TypeTree for XML Input and Output

    Posted 03/18/09 12:30 PM

    Originally posted by: SystemAdmin


    You can create an XSD from an XML data file by using an XSD Inference Engine. One ships with any XML studio product. One ships with Microsoft development tools and is called xsd.exe. Someone at your site probably has it.

    You can also go to http://www.hitsw.com/xml_utilites/
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender