alaneaston666
Aug 19th, 2005, 09:26 AM
Hello All,
I am just getting into vb.net and XML, a daunting task.
I am creating an XML file from a recordset, but need to include references to XML schemas at the very beginning of the XML file.......how do I do that.
I used the following as a test, but need to include the references to the schemas somehow.
mywriter = New System.Xml.XmlTextWriter(Server.MapPath("myfoo666.xml"), System.Text.Encoding.UTF8)
With mywriter
'NEED SOMETHING IN HERE TO REFERENCE THE SCHEMA(.XSD) FILES...?????.....
.WriteStartElement("MyBooks")
.WriteStartElement("Book")
.WriteAttributeString("ISBN", "1861005652")
.WriteAttributeString("Title", "How to make XML Work")
.WriteElementString("Author", "A. N. Other")
.WriteEndElement() 'For Book
.WriteEndElement()
End With
mywriter.Flush()
mywriter.Close()
Please, has anyone any ideas, I am struggling a bit.
Many Thanks,
Al...
I am just getting into vb.net and XML, a daunting task.
I am creating an XML file from a recordset, but need to include references to XML schemas at the very beginning of the XML file.......how do I do that.
I used the following as a test, but need to include the references to the schemas somehow.
mywriter = New System.Xml.XmlTextWriter(Server.MapPath("myfoo666.xml"), System.Text.Encoding.UTF8)
With mywriter
'NEED SOMETHING IN HERE TO REFERENCE THE SCHEMA(.XSD) FILES...?????.....
.WriteStartElement("MyBooks")
.WriteStartElement("Book")
.WriteAttributeString("ISBN", "1861005652")
.WriteAttributeString("Title", "How to make XML Work")
.WriteElementString("Author", "A. N. Other")
.WriteEndElement() 'For Book
.WriteEndElement()
End With
mywriter.Flush()
mywriter.Close()
Please, has anyone any ideas, I am struggling a bit.
Many Thanks,
Al...