HighTechTalks DotNet Forums  

XmlTextWriter,XmlDocument

Dotnet XML microsoft.public.dotnet.xml


Discuss XmlTextWriter,XmlDocument in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ars Comm - Ciro Ferraiuolo
 
Posts: n/a

Default XmlTextWriter,XmlDocument - 10-17-2007 , 10:35 AM






Hi all, I need to embed an image to an existing xml file. I guess this is
possible using XmlTextWriter.WriteBase64() method. My problem is that
XmlTextWriter writes to a new document.
How can I edit an existing doc (for example with XmlDocument class) and
write an image to it?
I'm sorry but I'm a bit confused about the difference between XmlTextWriter
and XmlTextDocument.

Thanks.




Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: XmlTextWriter,XmlDocument - 10-17-2007 , 10:59 AM






Ars Comm - Ciro Ferraiuolo wrote:
Quote:
Hi all, I need to embed an image to an existing xml file. I guess this is
possible using XmlTextWriter.WriteBase64() method. My problem is that
XmlTextWriter writes to a new document.
How can I edit an existing doc (for example with XmlDocument class) and
write an image to it?
I'm sorry but I'm a bit confused about the difference between XmlTextWriter
and XmlTextDocument.
Are you using .NET 2.0 or later? Then you can combine XmlWriter and
XmlNode (respectively XmlDocument) e.g.
using (XmlWriter writer =
someElementNode.CreateNavigator().AppendChild())
{
writer.WriteBase64(someByteArray, 0, someByteArray.Length);
}


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.