Parsing XML over TCP/IP

Sorry if this has been posted before...

I am receiving XML messages over a TCP client.  Messages vary in size and
sometimes can arrive in groups.  Thus, I am not guaranteed to receive a full
message in a single read from my socket.

I am loading each message into an XmlDocument after it arrives.  I need a
way to make sure I have a complete XML message before I load it into an
XmlDocument or it will throw an exception.  I am currently finding complete
messages by turning each read into a string and manually look for closing
tags.  Surely there is an easier way to accomplish this, perhaps with an
XmlReader or XmlTextReader?

Thanks
Thomas


0
7/29/2003 2:17:58 PM
dotnet.xml 7266 articles. 0 followers. Follow

6 Replies
901 Views

Similar Articles

[PageSpeed] 56

Thomas Polan wrote:

> Sorry if this has been posted before...
> 
> I am receiving XML messages over a TCP client.  Messages vary in size and
> sometimes can arrive in groups.  Thus, I am not guaranteed to receive a full
> message in a single read from my socket.
> 
> I am loading each message into an XmlDocument after it arrives.  I need a
> way to make sure I have a complete XML message before I load it into an
> XmlDocument or it will throw an exception.  I am currently finding complete
> messages by turning each read into a string and manually look for closing
> tags.  Surely there is an easier way to accomplish this, perhaps with an
> XmlReader or XmlTextReader?

I see two separate problems here - partial documents and grouped documents. 
Former one is simple - just create XmlTextReader over the stream and it'll 
read it till EOF. But if second document would arrive immediately after first 
one XmlTextReader will throw XmlException, because that breaks XML 
well-formdness rules. So you need some way to separate XML documents in a 
stream, e.g. put \0 between them - it'll stop XmlTextReader just as EOF has 
been encounered and then you can check if the stream is still can be read and 
start another XmlTextReader.
-- 
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

0
oleg7603 (294)
7/29/2003 5:37:15 PM
What I'm really looking for is an XmlReader that blocks on a network stream
until data arrives.  When xml arrives, it will read until it finds a
complete record and then notify me.  I'm trying to avoid having to touch or
modify the stream at all.

Thomas

"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:%23yOZ18eVDHA.1052@TK2MSFTNGP09.phx.gbl...
> Thomas Polan wrote:
>
> > Sorry if this has been posted before...
> >
> > I am receiving XML messages over a TCP client.  Messages vary in size
and
> > sometimes can arrive in groups.  Thus, I am not guaranteed to receive a
full
> > message in a single read from my socket.
> >
> > I am loading each message into an XmlDocument after it arrives.  I need
a
> > way to make sure I have a complete XML message before I load it into an
> > XmlDocument or it will throw an exception.  I am currently finding
complete
> > messages by turning each read into a string and manually look for
closing
> > tags.  Surely there is an easier way to accomplish this, perhaps with an
> > XmlReader or XmlTextReader?
>
> I see two separate problems here - partial documents and grouped
documents.
> Former one is simple - just create XmlTextReader over the stream and it'll
> read it till EOF. But if second document would arrive immediately after
first
> one XmlTextReader will throw XmlException, because that breaks XML
> well-formdness rules. So you need some way to separate XML documents in a
> stream, e.g. put \0 between them - it'll stop XmlTextReader just as EOF
has
> been encounered and then you can check if the stream is still can be read
and
> start another XmlTextReader.
> -- 
> Oleg Tkachenko
> http://www.tkachenko.com/blog
> Multiconn Technologies, Israel
>


0
7/29/2003 5:50:39 PM
Thomas Polan wrote:

> What I'm really looking for is an XmlReader that blocks on a network stream
> until data arrives.  When xml arrives, it will read until it finds a
> complete record and then notify me.
There is no such thing as "complete record" in XML. XmlReader reads to 
the end of file or end of stream, so the following
<first-doc>
</first-doc>
<second-doc>
</second-doc>
will be treated as non wellformed XML document with 2 root element 
nodes. If your XML documents don't come with xml declarations, you can 
read above as single XML fragment by XmlTextReader, but then you have to 
separate them yourself, actually it could be done based on Depth property.
-- 
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

0
oleg7603 (294)
7/29/2003 6:10:39 PM
Hello,

> Sorry if this has been posted before...
>
> I am receiving XML messages over a TCP client.  Messages vary in size
> and sometimes can arrive in groups.  Thus, I am not guaranteed to
> receive a full message in a single read from my socket.
>
> I am loading each message into an XmlDocument after it arrives.  I
> need a way to make sure I have a complete XML message before I load
> it into an XmlDocument or it will throw an exception.  I am currently
> finding complete messages by turning each read into a string and
> manually look for closing tags.  Surely there is an easier way to
> accomplish this, perhaps with an XmlReader or XmlTextReader?

im working on the same stuff. First i took XMLDocument to validate if have a
complete node that i can parse. But the XmlDocument is very very slow.
Especially on compact Framework. Thats the Reason why im working at the
moment at a better and faster way with the XmlReader or XmlTextReader. You
must Read in a XmlReader and check the depth of the Reader. Then you know
when you have a complete node. The XmlReader must be bound to a Stream. My
problem is that i found no way for now to create a XmlDocument from the
Reader when i know that i have a complete now since this position.
Below is the code of my old Socket Queue class. xmlReader is a small wrapper
class here for the XmlDocument. Can send it to you when it helps.

Alex

public class SocketQueue
 {
  // static variable where we spool the socket Data when Streams
  // are not partial
  private static string m_XML = "";

  public SocketQueue(string strSocket, Session s)
  {
    XML_Node xmlReader = new XML_Node(m_XML + strSocket);

     if ( xmlReader.Valid == true )
    {
     // We have one valid XML Node
     // send it to the parser

     s.RaiseOnIncomingXML(m_XML + strSocket);
     Parser parse = new Parser(m_XML + strSocket, s);
     m_XML = "";
    }
    else
    {
     //XML_Node xmlReader2 = new XML_Node("<dummy>" + strSocket +
"</dummy>");
     XML_Node xmlReader2 = new XML_Node("<dummy>" + m_XML + strSocket +
"</dummy>");
     if(xmlReader2.Valid == true)
     {
      // we have more than 1 node
      // get all childnodes and send them to the Parser
      m_XML = "";

      for (int i = 0; i < xmlReader2.XMLObj.ChildNodes[0].ChildNodes.Count;
i++)
      {

s.RaiseOnIncomingXML(xmlReader2.XMLObj.ChildNodes[0].ChildNodes[i].OuterXml)
;
       Parser parse = new
Parser(xmlReader2.XMLObj.ChildNodes[0].ChildNodes[i].OuterXml,s);
      }
     }
     else
     {
      // we have no complete XML Node
      m_XML = m_XML + strSocket;

     }
    }
   }

  }
 }


0
7/30/2003 6:01:22 AM
Oleg,
Thank you for your suggestions.  Using the depth property, I am able to
identify when I have a complete node.

Alexander,
I do not have my XmlReader bound to my TCP stream.  Rather I point the
XmlReader to a string buffer.  When I receive data from the server, I cast
the read into a global string variable.  Each time I get data from the
socket, I concatenate this to my global string (I suppose I could be using a
stream instead of a string).  I then try to look for a complete node.  If I
find a complete node, I spawn a thread and call a procedure that loads the
complete node into an XmlDocument.  Afterwards, I clear that xml from the
buffer and try to find another complete node until the XmlReader returns an
error.  Here is my code:

'XmlFrag -> global string var

'Each time I receive data from the socket:

XmlFrag = XmlFrag & str    'str = read from socket converted to string
Do While XmlFrag <> ""    'Will run in loop until I parse the entire buffer
or XmlReader throws an exception
    parseXML
End While

Private sub parseXml
Try
    Dim nt as NameTable = new NameTable
    Dim nsmgr as XmlNamespaceManager = new XmlNamespaceManager(nt)
    Dim context as XmlParserContext = new XmlParserContext(Nothing, nsmgr,
Nothing, XmlSpace.None)
    Dim reader as XmlTextReader = new XmlTextReader(XmlFrag,
XmlNodeType.Element, context)
    Dim sXML as string = ""

    While (reader.Read())
        Select Case reader.NodeType
            Case XmlNodeType.Element
                If reader.Depth = 0 then    'If I am at the beginning of a
complete node
                    sXML = reader.ReadOuterXml()    'Try to read to the end
of the node, if an error is thrown, it means there was not a complete node
in the read
                    ThreadPool.QueueUserWorkerItem(AddressOf routeXMLString,
sXML)    'spawn thread to deal with xml (load into XmlDocument)
                    XmlFrag = XmlFrag.Remove(0, sXML.length)    'Clear
string of parsed xml
                    reader.Close()
                    Exit While
                End if
        End Select
    End While
Catch ex As Exception
    Throw New Exception(ex.Message)
End Try

End Sub

You also might want to check out this SAX parser for .NET at:
http://www.xmlforasp.net/codeSection.aspx?csID=36

-Thomas

"Alexander Gnauck" <alex.gnauck@gmx.de> wrote in message
news:bg7mvo$l3ecm$1@ID-112594.news.uni-berlin.de...
> Hello,
>
> > Sorry if this has been posted before...
> >
> > I am receiving XML messages over a TCP client.  Messages vary in size
> > and sometimes can arrive in groups.  Thus, I am not guaranteed to
> > receive a full message in a single read from my socket.
> >
> > I am loading each message into an XmlDocument after it arrives.  I
> > need a way to make sure I have a complete XML message before I load
> > it into an XmlDocument or it will throw an exception.  I am currently
> > finding complete messages by turning each read into a string and
> > manually look for closing tags.  Surely there is an easier way to
> > accomplish this, perhaps with an XmlReader or XmlTextReader?
>
> im working on the same stuff. First i took XMLDocument to validate if have
a
> complete node that i can parse. But the XmlDocument is very very slow.
> Especially on compact Framework. Thats the Reason why im working at the
> moment at a better and faster way with the XmlReader or XmlTextReader. You
> must Read in a XmlReader and check the depth of the Reader. Then you know
> when you have a complete node. The XmlReader must be bound to a Stream. My
> problem is that i found no way for now to create a XmlDocument from the
> Reader when i know that i have a complete now since this position.
> Below is the code of my old Socket Queue class. xmlReader is a small
wrapper
> class here for the XmlDocument. Can send it to you when it helps.
>
> Alex
>
> public class SocketQueue
>  {
>   // static variable where we spool the socket Data when Streams
>   // are not partial
>   private static string m_XML = "";
>
>   public SocketQueue(string strSocket, Session s)
>   {
>     XML_Node xmlReader = new XML_Node(m_XML + strSocket);
>
>      if ( xmlReader.Valid == true )
>     {
>      // We have one valid XML Node
>      // send it to the parser
>
>      s.RaiseOnIncomingXML(m_XML + strSocket);
>      Parser parse = new Parser(m_XML + strSocket, s);
>      m_XML = "";
>     }
>     else
>     {
>      //XML_Node xmlReader2 = new XML_Node("<dummy>" + strSocket +
> "</dummy>");
>      XML_Node xmlReader2 = new XML_Node("<dummy>" + m_XML + strSocket +
> "</dummy>");
>      if(xmlReader2.Valid == true)
>      {
>       // we have more than 1 node
>       // get all childnodes and send them to the Parser
>       m_XML = "";
>
>       for (int i = 0; i <
xmlReader2.XMLObj.ChildNodes[0].ChildNodes.Count;
> i++)
>       {
>
>
s.RaiseOnIncomingXML(xmlReader2.XMLObj.ChildNodes[0].ChildNodes[i].OuterXml)
> ;
>        Parser parse = new
> Parser(xmlReader2.XMLObj.ChildNodes[0].ChildNodes[i].OuterXml,s);
>       }
>      }
>      else
>      {
>       // we have no complete XML Node
>       m_XML = m_XML + strSocket;
>
>      }
>     }
>    }
>
>   }
>  }
>
>


0
7/30/2003 8:12:21 PM
hi Thomas,

>
> You also might want to check out this SAX parser for .NET at:
> http://www.xmlforasp.net/codeSection.aspx?csID=36
>

the Link to the Sax Parser looks very good.
Your code works too. I think you restart always the reader from the
beginning of the string. The advantage of a stream is that you can add bytes
to the stream without restarting the reader. So it would be a bit faster.
But the problem i have is when i call  reader.ReadOuterXml()   in the while
Reader.Read() loop then the reader stops. In my application i could also
have 2 or more complete nodes to parse in the socket stream. Then the reader
shouldnt stop. So i need a way to get the currentNode as string or XML
document without stopping the reader.

Alex


0
7/31/2003 6:14:31 AM
Reply:

Similar Artilces:

Ordering xml using xsl in c#
Hi, I have a xml dataset I'd like to order, and save in that order. I've written an xsl to do the transformation, but because the xml file has a xsd namespace, it doesn't work. A cutdown version of the xml file looks like this: <?xml version="1.0" standalone="yes"?> <hsPrinters xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xmlns="http://tempuri.org/printer.xsd"> <city> <code>LN</code> <name>London</name> <comment>Herbert Smith London Offices</comment> </ci...

Parsing Question
I've done parsing where you have one delimiter such as a comma or space. What if you have more than one? Example data: sStr(0) = "3/9" sStr(1) = "3/11 3/15-" sStr(2) = "3/8+ 3/12" sStr(3) = "3/9 3/15" sStr(4) = "3/8- 3/10+ 3/15" The strings above are Month/Day with some having an additional - or + character next to it. These dates are extracted from Excel cells as strings. I need to break those strings down into individual dates. So for sStr(4), I need to parse out "3/8", "3/10" and "3/15&...

how to parse <?xml version="1.0" encoding="UTF-8"?> with xpath? is it possible?
how to parse <?xml version="1.0" encoding="UTF-8"?> with xpath? is it possible? "Daniel" <softwareengineer98037@yahoo.com> wrote in message news:%23g11DbDOGHA.2176@TK2MSFTNGP10.phx.gbl... > how to parse <?xml version="1.0" encoding="UTF-8"?> with xpath? is it > possible? No -- the xml declaration is not represented in the XML Infoset. Cheers, Dimitre Novatchev ...

Locating xmlns nodes in XML documents (for XML document metrics)
I've been writing an XML document analyzer that reads XML document and tracks the metrics of the document. Statistics such as a node count fo each type of XML node are printed out I am trying to locate 'xmlns' nodes using the XPath (not DOM or SAX) API Unfortunately the XPathNavigator concept of namespace nodes for eac element is only accessible via MoveToFirstNamespace() an MoveToNextNamespace(). The XPath model constructs a namespace node lis for EACH ELEMENT where each namespace node represents a namespace CURRENTL IN SCOPE for the current XML node I would like to easily loca...

Parsing cells
Hi Folks, I have data in cells which is OCR`d from my phone bill, and some of the info is corrupt. Where I should be getting eg. 17 Nov 14:49 for date/time I am getting O17 Nov 14:49 or C17Nov 14:49. The reason is that there are unreadable icon characters to signify day or night. Questions: 1)How do I remove the faulty characters......they are always the first digit in the date if they are there. 2)How can I seperate the date and time into two adjasent colums of cells rather than their current format in one cell. Any and all help greatly appreciated. John Hi John You ca...

Inport/Eport XML
I am running Microsoft Office 2000 on my work computers. I am editing a database and I need said database to export a table named Data Table to a .xml file. I also need to be able to import a .xml file and have it added to the same table. I don't know if 2000 has the capability. Check your VBA references for an XML library. I am using 2003 and we have it. You use the xmlExport and xmlImport methods to do that. -- Dave Hargis, Microsoft Access MVP "Bobby.Dannels@gmail.com" wrote: > I am running Microsoft Office 2000 on my work computers. I am editing > a database a...

What is the quickest way to get an xml based dataset to add entries to SQL Server?
Because there is no 'datareader' involved, what is the most efficient way to get an XML based dataset to be added to an SQL server dataset? I would hate to have to create a new SQL connection and iterate through making "executenonquery" for each row in the dataset. That seems horribly in-efficient. I know of no other way to get an xml based dataset to push data to the database though. Any pointers? Thanks for any pointers, Peter Robbins Freelance Programmer C#/PHP "MurdockSE" <murdock@nc.rr.com> wrote in message news:1153922058.675709.165630@h48g2000cwc.go...

Parse Nested Elements to Single DataGrid
I have been losing my mind trying to parse an XML document (with nested child elements, not all of which appear in each parent node) into a DataGrid object. What I want to do is "flatten" the XML document into a text document with a single row for each parent node (that has all of the values from all of the child nodes for that row) The DataView within VS 2005 IDE displays my 15 or so child tables - and knows that some parent rows don't have child rows in every relation - but trying to get all the child tables to go with the correct parent row programmatically is killin...

xml graphic representation
I'm new to using XML, so I'm seeking some general pointers about approaching a project. I'd like to read the sitemap xml file, and generate a graphic representation of the website from the site map. I would like to do this dynamically (creating the page from the current sitemap file). I'm wondering if there are some built in functions I can use, for example to: 1) parse the xml file, creating units at each node 2) interpret levels within the file 3) create graphics based on each node, writing the node property in the text of the graphic object. I know what functions I'...

generate xml ...
hi, i need to generate an xml files of some data in my database ... i've an xml sample of the result xml nad i've to create a xml with the same structure ... which it is the better and faster way? Can i retrieve a schema from the sample.xml and then write an xml based on this schema ? Might i use Dataset.readxmlschema , Dataset.readxml and Dataset.writexmlschema , Dataset.writexml ??? tnx in advance andrew ...

How to start working with XML in Excel?
(Windows XP Pro, Office 2003) I work with a Java-based program that creates an XML file. Sometimes information needs to be transferred between XML docs. At the moment, I can open an XML in Word, and copy and paste between the XMLs. Some of the data, though, would lend itself very well to an Excel spreadsheet. When I try to open an XML file with Excel (either by right-clck on the XML file and Open With or XL >> Data >> XML >> Import), Excel creates a schema that doesn't present the information in a way I can logically work with it. The Java program consists of forms ...

excel to xml
Hello I am trying to figure this out. Yes there is some new feature in excel 2003 according to the websites that I browsed thro' It is about transforming a excel spreedsheet into Xml with the syntax you wanted instead of repeating cut and paste of the syntax in an Xml file. I was reading in msdn that excel 2003 has these features but I have no clue. When I give file save as in an excel file .I have many features I can save as to,so when I select save as xml data .I can include an xml map to map to the excel fields but after that it doesn't go forward for me. I nee...

Line Breaks in XML element value
I am using the XPathNavigator.Value in .Net to get the value of one of the elements(say "Notes") from my XML ? The value contains lots of "line breaks" and "spaces". <notes> This is to try the new car that I bought last week </notes> How do I avoid getting the "linebreaks" and extra "white spaces" ? I just want the string "This is to try the new car that I bought last week". Venky wrote: > I am using the XPathNavigator.Value in .Net to get the > value of one of the elements(say "Notes&quo...

Parsing CSV
Hi, im using A file with records in my mfc application, i need to read*/write records to the file anybody ahs a clue where should i start? Take a look at CStdiofile and CString::Format() (for output) and CString::Tokenize() (for parsing input). You can use ReadString() and WriteString() to access the file line by line. Tom "fima" <fkpkot@gmail.com> wrote in message news:eXA9vp95FHA.1184@TK2MSFTNGP12.phx.gbl... > Hi, > im using A file with records in my mfc application, i need to read*/write > records to the file anybody ahs a clue where should i start? >...

Parsing
Hello, I have an Excel application where I read a text file.Recently the text file had a change and had three(3) new fields added.This data is now in the last column.I want to parse this data which has a space delimiter into three seperate columns.There are 10 fields and the data is captured in the last column.How do I do this in VBA without the "text to column" manual method. Thanks, Roy Try using the VBA TextToColumns method... In article <1193081380.394989.87940@q5g2000prf.googlegroups.com>, Roy <praish1998@yahoo.com> wrote: > How do I do this in VBA without...

Putting Deserialized XML back into a dataset
I have deserialized XML back into an object, so now... How do I get the object instance back into a dataset? The same XML file(before deserializing) can be put into the dataset when read as a file. Dim objPipeline As iClas_Pipelines = New iClas_Pipelines objPipeline = objPipeline.UnPack(Server.MapPath("XML/iclass_pipelines.xml")) Dim objDataset As New DataSet ----------- error--------------objDataset.ReadXml(objPipeline.Pipeline)---------error--- ---------- Where do I go from here? ...

XML parsing in VB
<rss version="2.0"> <channel> <title>Latest P</title> <link>/P</link> <description>A brief overview of the weather for the week ahead.</description> <language>en-us</language> <item> <title>Tue 1/12 : 2 Stars</title> <link>/P</link> <description> *Rating :: 2 Stars*. SSSS :: 11 ft @ 7 secs. Wind :: 26mph SSE </description> </item> Above is a sample copy of the xml, from which I wish to extract and display items based on the bolded text ( i.e. those which h...

how to get xml as a string from an XmlDocument object
hi all, How would I get the xml as a string from an XmlDocument object? thanks Joyce You can use the InnerXml property. -Asad "joyce chan" wrote: > hi all, > > How would I get the xml as a string from an XmlDocument object? > > thanks > Joyce > > joyce chan wrote: > How would I get the xml as a string from an XmlDocument object? OuterXml is one direct way, then you have the Save method to save to a StringWriter or the WriteTo method to do similar. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ ...

Parsing imported csv data
I need to find a way to parse data that I'm importing when the data has a comma "," delimiters. Sometimes the string has a comma in the name (i.e. GenVec, Inc. or RealNetworks, Inc) and sometimes the number amount has commas indicating thousands or millions. I have no control over the format of the imported data since it comes from an external website. I'm using XML functions to import such as: Dim objXML As Object Set objXML = CreateObject("MSXML2.ServerXMLHTTP") Debug.Print "Company Name = " & Split(objXML.responseText, ",&...

log parsing
can someone point me in the right direction for creating/implementing a script for ms exchange that will parse the log files for all incoming and outgoing emails? is it recommended to use the Microsoft LogParser tool for this? thx, jt You really should not be messing with Exchange log files. What are you hoping to achieve? Nue "JTL" <jliautaud@hotmail.com> wrote in message news:u2vVyH2KGHA.3100@tk2msftngp13.phx.gbl... > can someone point me in the right direction for creating/implementing a > script for ms exchange that will parse the log files for all incom...

XML Encoding question (C#)
Hi! I have the following problem: I am getting an XML file from a 3rd party. The encoding on the XML file is encoding="utf-8" I have no control over generation of this file. This file is produced by a Lotus Notes system and often has illegal characters embedded to it. Of course the .NET XML parser produces an error. I’ve been reading about XmlConvert.EncodeName but not sure where to apply it. It seems to me that I can call this method once the doc has been loaded into DOM? But it breaks before I load the doc into DOM. Here’s how I load the xml file: private static XmlDocu...

Importing a large .XML file into Excel 2003
I have to import an xml file into Excel 2003. When importing I get a message saying it's too big to import. When importing into Excel 2007 (it succeeds!) I get more than 74000 rows which obviously can't fit into Excel's 2003 65000 rows of one sheet. I have to stay with Excel 2003. Is there a way to import such an XML file into Excel 2003 as a pivot table (which somehow "compreses" the extent of rows). TIA Primoz ...

How to parse message automatically
I want to use a rule to parse the information in emails from a specific email address, convert the content into a MS Word template format, and then email the document as an attachment to an email address that will be one of the "fields" in the received email. Anyone who has had experience with anything like this? Thanks You may need to use VBA, but take a look at www.ornic.com - exlife might do what you need. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www...

XML Help!
Hello, I need some help with XML and dataset. Take a look at this schema at the bottom of this email. If I load this in a dataset, I get two tables, "mandatoryUsageUserIdList" and "mandatoryUsageUserIdList2". Good. If you see the type "ReplacementUserIdList", it has an element "userId" with maxOccurs attribute of 2147483647.. However, the tables "mandatoryUsageUserIdList" and "mandatoryUsageUserIdList2" simply contain them as another column thereby making multiple rows impossible for "userId".. I was actually expect...

Generating an XML file from an XML schema
Hi, How can I generate an XML file from an XML schema using Vb.NET? Thanks Sean How can I generate an <XML/> file from an <?XML-schema/> using <?Vb.NET?/> ============== Make everyone pay for it, beneficiary MICROSOFT. "Sean" <Sean@discussions.microsoft.com> wrote in message news:C68523E2-DE28-4226-8B04-61B10DB527BC@microsoft.com... > Hi, > > How can I generate an XML file from an XML schema using Vb.NET? > > Thanks > > Sean ...