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/