XSL to XML transformation...

B

Bar??

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top