MSXML to System.Xml Conversion Code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian R.

    #1

    MSXML to System.Xml Conversion Code

    I have some code that I am converting from VB6 to C#. The VB code used the
    'urn:schemas-microsoft-com:datatypes' schema to allow the entry of strongly
    typed data via the nodeTypedValue properties on MSXML elements. In System.Xml
    I am seeing that nodeTypedValue ability is not present.

    Is it my responsibility to manage the conversion of the types wihtout
    automatic support from the .NET DOM model?

    Thanks,

    --
    Brian R.

  • [MSFT]

    #2
    RE: MSXML to System.Xml Conversion Code

    Hi Brian,

    There is no equivalent to nodeTypedValue in System.Xml namespace. You have
    to manage the conversion. If you just want to valiadate typed value with
    nodeTypedValue, there is an XmlValidatingRe ader in System.Xml which is an
    XmlReader that layers type information and validation over an
    XmlTextReader. This has ReadTypeValue() method for reading a node as a
    strongly typed XSD value. Here is a helpful article on this:

    Accessing Schema Type Information
    http://msdn.microsoft.com/library/de...us/cpguide/htm
    l/cpconaccessings chematypeinform ation.asp

    Luke


    Comment

    Working...