Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Insert bin.base64 into xmlNode

From: "Han" <hp4444@------.---.----->
To: 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) 



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent