![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Insert bin.base64 into xmlNode [Thread Next] Re: Insert bin.base64 into xmlNodeTo: NULL Date: 3/1/2005 3:15:00 PM If you mean system.xml by c#, there is no equivalent of nodeTypedValue in
system.xml.
Workaround. At least you can compose the same result with WriteBase64().
string s="a";
ASCIIEncoding ae=new ASCIIEncoding();
byte[] b=ae.GetBytes(s);
StringWriter sw = new StringWriter();
XmlTextWriter tw = new XmlTextWriter(sw);
tw.WriteStartElement("a");
tw.WriteAttributeString("xmlns:dt",
"urn:schemas-microsoft-com:datatypes");
tw.WriteBase64(b, 0, b.Length);
tw.WriteEndElement();
Console.WriteLine(sw.ToString());
--
Pohwan Han. Seoul. Have a nice day.
"sg" <sg@d...> wrote in message
news:8A264E7C-5F73-48DF-94F9-F0634A78DFFB@m......
> Hi,
> I'm just moving from vb6 to c# (2005Beta1) and I need some XML help.
> I have vb6 code I'm using to send file inside xml node (using DataType
> bin.base64).
> How do I do this in C#?
>
> The vb6 code:
> objXmlDom.loadXML (sXML)
> objXmlDom.documentElement.setAttribute "xmlns:dt",
> "urn:schemas-microsoft-com:datatypes"
>
> Set objNode = objXmlDom.selectSingleNode("File/DataValue")
> objNode.dataType = "bin.base64"
> objNode.nodeTypedValue = objAdoStream.Read(adReadAll)
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
