Hi All, 
 
I have the following situation and hope someone can assist me. When I load an 
xml document written to a XmlTextWriter object, I can read the data from the 
embedded StringWriter and load it into an Xml Document object. 
 
However, if I use a memory stream object instead of a StringWriter object, I 
get an "Root Element Missing" error message from dot net.
 
The following snippet works ............ 

Dim sw As System.IO.StringWriter
sw = New System.IO.StringWriter
writer = New System.Xml.XmlTextWriter(sw) 
Dim dd As New XmlDocument
dd.load(sw) 

The following snippet doesnt work ........... 

Dim mem As System.IO.MemoryStream
Dim node As System.Xml.XmlNode
mem = New System.IO.MemoryStream(node.InnerText.Length)
writer = New System.Xml.XmlTextWriter(mem) 
Dim dd As New XmlDocument
dd.load(mem)   ''''' Craps out right here 

Can anyone pleeeeeeeeeeease help, thanks.

NIck

ps: The reason I need to use the MemoryStream instead is because the 
stringwriter encodes the text with UTF-16 and IE only recognizes UTF-8.

 




---------------------------------
Post your free ad now! Yahoo! Canada Personals


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to