I am using xsd.exe to create classes out of an xml file.
Can someone show me the XMLStream calls to make to populate this?. I have
the data in a String var.
System.Xml.Serialization.XmlRootAttribute(Namespac e="", IsNullable=false)]
public class NewDataSet {[
[System.Xml.Serialization.XmlElementAttribute("Cust omerXMLString",
Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public NewDataSetCustomerXMLString[] Items;
}
public class NewDataSetCustomerXMLString {
[System.Xml.Serialization.XmlElementAttribute(Form= System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string NAME;
....
"plex4r" wrote:
Peter and David, thanks for the information. Either solution sounds just
like what I need. I will investigate both and see which solution works best
for me.
Regards, Bill.
"Peter Bromberg [C# MVP]" wrote:
Plex4r,
I suggest you consider the XSDObjectGen add-in, which can be found for
download on MSDN. This actually gives you a new project type for this in
Visual Studio .NET, and it runs rings around XSD.EXE.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"plex4r" wrote:
I am reading data out of a relational database and converting the data to XML.
I after I send this data from a web service I am reading the data using
XMLTextReader calls like the following:
if(customerReader.NodeType == XmlNodeType.Element)
if (customerReader.LocalName.Equals("COLUMN1NAME"))
>
I hate using the colmn names like this (or in a constant).
What I want to do is specify the structure of the XML doc wiht a Schema (or
DTD) and then generate an object model from this. The Schema would have to
match my query i.e. there needs to be easy to add the data.
>
I would like to call something like.
row = xmldoc.readRow();
String row.COLUMN1NAME();
>
Any suggestiong on how I can do this?
>