my.net

My Photo
Name:
Location: United States

Friday, October 12, 2007

InteropXML - .NET Xml


MSXML.tagDOMNodeType.NODE_ELEMENT - Xml.XmlNodeType.Element
MSXML.IXMLDOMNamedNodeMap - Xml.XmlNamedNodeMap
MSXML.IXMLDOMNode - Xml.XmlNode
MSXML.IXMLDOMAttribute - Xml.XmlAttribute


nodValue.text- sInnerText
nodeName - Name
ChildNodes.length - ChildNodes.Count
xml - OuterXml


---------------
mscorlib The type System.Xml.XmlDocument in Assembly System.Xml, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as serializable.

Dim r_xmldoc As New Xml.XmlDocument, parzError As String
LoadnParseXML(r_XMLdoc, sr_XMLdoc, parzError)

sr_XMLdoc = r_xmldoc.InnerXml
---------------

---------------

Public Function LoadnParseXML(ByRef xmldoc As Xml.XmlDocument, ByVal xmlstr As String, _
ByRef parzError As String) As Boolean
On Error GoTo Err_LoadnParseXML
Dim bRet As Boolean

xmldoc.LoadXml(xmlstr)

bRet = True
Exit_LoadnParseXML:
Return bRet
Err_LoadnParseXML:
parzError = Err.Number & "-" & Err.Description
bRet = False
Resume Exit_LoadnParseXML
End Function

---------------


Thursday, October 11, 2007

WCF - when to use what binding

Monday, October 08, 2007

System.Xml.XmlDocument is not marked as serializable

XmlDocument is not marked as serializable, as you can send as a parameter to COM+ methods, the resolution is to send Xml as string

Dim r_oXMLdocString As String = r_oXMLdoc.InnerXml
call the server function here...


ServerFunction()
{
Dim r_xmldoc As New Xml.XmlDocument, parzError As String
LoadnParseXML(r_XMLdoc, sr_XMLdoc, parzError)

do processing...

sr_XMLdoc = r_xmldoc.InnerXml
}