Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetType of XML-string

Status
Not open for further replies.

mrdance

Programmer
Apr 17, 2001
308
SE
In order to deserialize you need to know the type of what you are deserializing to. I am transfering serialized versions of different classes over a socket. I need to know the type of the string received. I found one way but I believe that there must exist either a function or another way to determine this fast. Right now I am creating a new XML-document, using the load function, and then look at the ElementName of the document to determine class.

Dim doc As XmlDocument = New XmlDocument
doc.LoadXml(strXML)
Select Case doc.DocumentElement.Name

Is there any faster or better way?

thanks!

--- neteject.com - Internet Solutions ---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top