Hello everybody, here is my question (sorry for my english)
I know I am going to receive some xml´s. I know the structure they are
going to have.
As an example:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<gi-test xmlns="urn:pm_interfaz_soap2">
<cod-user xmlns="">TESTUSER</cod-user>
<tex-pass xmlns="">TESTPASS</tex-pass>
<cod-action xmlns="">pupporttest</cod-action>
<cod-issue xmlns="">6001-000200880</cod-issue>
<typ-associate xmlns="">P</typ-associate>
<tex-associate xmlns=""></tex-associate>
<fec-action xmlns="">11/01/2008 12:21:00</fec-action>
<lst-options xmlns="">
<item xsi:type="xsd:string">test1</item>
<item xsi:type="xsd:string">test2</item>
</lst-options>
<tex-issue xmlns="">Issue test type P</tex-issue>
</gi-test>
</soapenv:Body>
</soapenv:Envelope>
How can I validate future xmls I will receive, knowing they will need
to have the structure of the above xml?
I think I should generate an XSD, DTD or something similar from the
above xml, and then validate the future xml I will receive.
If this is correct (not really sure), another issue is that I will not
have those xml in a file, and all I have found for validating xml need
to have the xml in a file.
Another problem, is that I can not modify those xmls so they will not
be linked to the xsd to which they will need to be validated.
How could this be done??
I don´t know if I have explained well, but thanks in advance for any
help.
Greetings.
Harshal - 19 Jan 2008 07:15 GMT
Moncholv, you can use Xsd.exe
(http://msdn2.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx) to generate
schema from Xml.
Not sure about rest.
Thanks,
Harshal
Hello everybody, here is my question (sorry for my english)
I know I am going to receive some xml´s. I know the structure they are
going to have.
As an example:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<gi-test xmlns="urn:pm_interfaz_soap2">
<cod-user xmlns="">TESTUSER</cod-user>
<tex-pass xmlns="">TESTPASS</tex-pass>
<cod-action xmlns="">pupporttest</cod-action>
<cod-issue xmlns="">6001-000200880</cod-issue>
<typ-associate xmlns="">P</typ-associate>
<tex-associate xmlns=""></tex-associate>
<fec-action xmlns="">11/01/2008 12:21:00</fec-action>
<lst-options xmlns="">
<item xsi:type="xsd:string">test1</item>
<item xsi:type="xsd:string">test2</item>
</lst-options>
<tex-issue xmlns="">Issue test type P</tex-issue>
</gi-test>
</soapenv:Body>
</soapenv:Envelope>
How can I validate future xmls I will receive, knowing they will need
to have the structure of the above xml?
I think I should generate an XSD, DTD or something similar from the
above xml, and then validate the future xml I will receive.
If this is correct (not really sure), another issue is that I will not
have those xml in a file, and all I have found for validating xml need
to have the xml in a file.
Another problem, is that I can not modify those xmls so they will not
be linked to the xsd to which they will need to be validated.
How could this be done??
I don´t know if I have explained well, but thanks in advance for any
help.
Greetings.