Writing an inline schema for my XML which is returned from my web service.
Posted on 2006-06-30
I wonder if anybody can help, i need to return with my XML (from my webservice) an inline schema.
This is because i am using ReadXML in my program which takes the XML and converts to dataset, but currently because there is no inline schema ... all fields are imported as String.
currently this is an example of what is returned, as you can seen the field "TITLES" needs to be a Integer.. which i believe is possible if i specify an inline schema for my XML doc.
<?xml version="1.0" encoding="utf-8" ?>
<Error code="0" description="OK" />
Basically i have created my XML file by simply, building it in a string called returnedXML and then
XmlDocument xmlDocumentObject = new XmlDocument();
But to create an inline schema? How would i go about doing this? Is there some method for creating the schema from XmlDocument object?
Any help would be really appreciated. Thanks in advance