-
Read using XMLTextReader
This is my XML Document What I want is to read the <errcode> then read the
info within the <record></record>
How do I do this in VB.Net?
I loop thourgh the record when I get to the node <record> it only stays at
that level. It does not go to node <record_id_>
My goal is to move it from this XML document into a class object.
<?xml version="1.0" ?>
<qdbapi>
<action>API_DOQUERY</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<dbinfo>
<name>2004 NCAC Invites</name>
<desc />
</dbinfo>
<variables />
<chdbids />
<record>
<record_id_>1</record_id_>
<firstname>John</firstname>
<lastname>Doe</lastname>
<conference>1</conference>
<registration>1</registration>
<qualifylevel>5</qualifylevel>
</record>
<ticket>1_9cig9z8f_bvtp_cdwhy3qb8wdpxibjt9ffjbxijp7t</ticket>
</qdbapi>
-
Re: Read using XMLTextReader
I'm not totally sure what you are asking for but if you would like to move
this into a class object use the following:
Dim rdr As IO.StringReader
rdr = New IO.StringReader(xmlDoc)
Dim slz As New Serialization.XmlSerializer(GetType(<Class Object>))
hope this helps
Anthony
<vb.@127.0.0.1> wrote:
>
>This is my XML Document What I want is to read the <errcode> then read the
>info within the <record></record>
>
>How do I do this in VB.Net?
>
>I loop thourgh the record when I get to the node <record> it only stays
at
>that level. It does not go to node <record_id_>
>
>My goal is to move it from this XML document into a class object.
>
><?xml version="1.0" ?>
><qdbapi>
> <action>API_DOQUERY</action>
> <errcode>0</errcode>
> <errtext>No error</errtext>
> <dbinfo>
> <name>2004 NCAC Invites</name>
> <desc />
> </dbinfo>
> <variables />
> <chdbids />
> <record>
> <record_id_>1</record_id_>
> <firstname>John</firstname>
> <lastname>Doe</lastname>
> <conference>1</conference>
> <registration>1</registration>
> <qualifylevel>5</qualifylevel>
> </record>
> <ticket>1_9cig9z8f_bvtp_cdwhy3qb8wdpxibjt9ffjbxijp7t</ticket>
></qdbapi>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks