XSL to XML transformation...

Discussion in 'XML' started by Bar??, Mar 27, 2005.

  1. Bar??

    Bar?? Guest

    Hi,
    I have an xml file that is constructed from an SQL table. And besides
    I have got an xsd file. I try to construct a new xml file (from the
    xml file) that is formatted according to the xsd. I mean:

    my xml file:

    <Row>
    <Name> Name1 </Name>
    <Street> Street1 </Street>
    <City> City1 </City>
    </Row>

    <Row>
    <Name> Name2 </Name>
    <Street> Street2 </Street>
    <City> City2 </City>
    </Row>

    And my xsd file:

    <xs:schema xmlns:xs="..." elementFormDefault="qualified">
    <xs:element name="Person">

    <xs:complexType>
    <xs:sequence>
    <xs:element name="Name" type="xs:string"/>

    <xs:element name="address">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Street"
    type="xs:string"/>
    <xs:element name="City"
    type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>

    </xs:sequence>

    </xs:complexType>
    </xs:element>

    </xs:schema>

    Now, I try to transform the data in the xml file to a new xml file
    that is in the xsd file format. Therefore, the xml file that I may
    have after the process should be like this:

    <person>
    <Name> Name1 </Name>
    <Address>
    <Street>Street</Street>
    <City>City1</City>
    <adres/>
    </kisi>

    .......

    How can I perform this? Can I do this by using XmlSpy?

    Thanks in advance...
     
    Bar??, Mar 27, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hugo Ferreira
    Replies:
    0
    Views:
    393
    Hugo Ferreira
    Jul 14, 2004
  2. CK
    Replies:
    7
    Views:
    543
    Richard Tobin
    Oct 13, 2003
  3. DrTebi
    Replies:
    1
    Views:
    690
    Patrick TJ McPhee
    Jun 27, 2004
  4. icedgar
    Replies:
    1
    Views:
    373
    Joris Gillis
    Feb 7, 2005
  5. Replies:
    0
    Views:
    560
Loading...

Share This Page