[Home] [By Thread] [By Date] [Recent Entries]

  • From: Newsha Makooi <Newsha@i...>
  • To: xml-dev@l..., "'asp_xml@p...'" <asp_xml@p...>,"'vbxml@e...'" <vbxml@e...>
  • Date: Fri, 25 Aug 2000 11:02:20 -0600

Title: MSXML DOM and ASP JavaScript.

Good Day,

I need a bit of guidance and direction on using datatype assignments for MSXML DOM using JavaScript.

I am trying to append a child node to my DOM document; however, specifying a datatype of "bin.base64" does not render the value I expected!  For example, the following code:

        ...
        ...
        var AddXMLDoc = Server.CreateObject("Microsoft.XMLDOM") ;
        AddXMLDoc.async         = false;
        AddXMLDoc.validateOnParse       = false;
        AddXMLDoc.resolveExternals      = false;
        AddXMLDoc.preserveWhiteSpace = true;
        AddXMLDoc.documentElement       = AddXMLDoc.createElement("Root");
        var root = AddXMLDoc.documentElement;
        var newElem = AddXMLDoc.createElement("Newsha");
        newElem.dataType = "bin.base64";
        newElem.nodeTypedValue = "Hello DOM";
        root.appendChild(newElem);
        ...
        ...
yields the following XML document:
        <Root>
                <Newsha xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">Hello DOM</Newsha>
        </Root>

I was expecting the "Hello DOM" value to be encoded according to 'bin.base64' dataType declaration.

What am I missing?  Please advise.

Regards,
Newsha@I...

Please reply to the lists and Newsha@I... directly.  Thank you.


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member