parsing xml attribute value

Posted by vbNewbie on Stack Overflow See other posts from Stack Overflow or by vbNewbie
Published on 2010-12-27T16:15:06Z Indexed on 2010/12/27 16:54 UTC
Read the original article Hit count: 231

Filed under:
|
|

I have been parsing xml content using the xmlreader and cannot use the xml document but so far it works getting all elementcontent except for the attribute contents. I need to parse the link below found in the following entry;

<title>XXXX UUUUUU posted a</title>
<category term="NotePosted" label="Note Posted"/>
 <link rel="alternate" type="html"  href="http://www.dfsddsfdsf.com/profile.php?id=sdfdfsfdsdfddfsfd&amp;v=wall&amp;story_dbid=dssdfasdfdasfdsafafafa"/>
<source>......... <source>

I need the href tag in the link attribute but it keeps coming back null.

                 While ureader.Read
                    If ureader.HasAttributes Then
                        fId = ureader.GetAttribute("href")
                        If fId.Contains("?v=wall&amp") Then
                            fIdList.Add(fId)
                            Exit While
                        End If
                        If String.IsNullOrEmpty(fId) Then
                            fId = "NOTHING"
                        End If
                    End If
                End While

© Stack Overflow or respective owner

Related posts about Xml

Related posts about vb.net