vbMarkO Posted January 17, 2009 Posted January 17, 2009 Need help guys as this one is kicking my rear ... I am sure I am simply over looking whats in front of me but hey ... I am here now asking for insight Here is my result of the Rss.xml sorry its so much OOOPS it said it was to much ... so the link below in the code will take you to xml so you can see what I am up against ... I fear if I dont show the whole thing I might leave out something important. Info I am needing is found within each of these blocks <content type="xhtml" xml:lang="en-US" xml:base="http://tpdblog.typepad.com/most_wanted/"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> <strong>Name:</strong> Ronald James Bodine<a href="http://tpdblog.typepad.com/.a/6a00d83451c5bd69e2010536bfad74970b-pi" style="FLOAT: right"> <img alt="Bodine_Ronald" class="at-xid-6a00d83451c5bd69e2010536bfad74970b" src="http://tpdblog.typepad.com/.a/6a00d83451c5bd69e2010536bfad74970b-320wi" style="MARGIN: 0px 0px 5px 5px" /> </a> <br /> <br /> <strong>Race:</strong> White <br /> <strong>Sex:</strong> Male <br /> <strong>Age:</strong> 49 <br /> <strong>DOB:</strong> 10-19-59 <br /> <strong>Height:</strong> 5�10 <br /> <strong>Weight:</strong> 150 <br /> <strong>Hair:</strong> Gry <br /> <strong>Eyes:</strong> Hazel <br /> <strong>TPD#</strong> 150248<br /><br />Ronald Bodine is wanted out of Tulsa County for Possession of a Controlled Drug and Burglary of an Automobile. Bodine�s bond is $350,000. Bodine last know address is in the 8000 block of South 87th East Ave.<br /> </p> </div> </content> I cleaned this one up a bit so it will make a little more sense ... Anyway, I need to parse this ... I have tried several ways and for some reason I can not figure out how to get to the content ... I feel like such a noob <---- forgive that .... as I know we all see this alot but... I used to do this stuff in my sleep .. Its been several years since I have been in this and I cant beleive how much I forgot ... ok enough with the crying .... Ok ... would it be possible for someone to just help me a bit in how I can parse this so I can get at the info within the above example I need to access 1. the img as located in this url href="http://tpdblog.typepad.com/.a/6a00d83451c5bd69e2010536bfad74970b-pi 2. then the info between the <strongs> ie; Race: White Sex: Male and such like ..... I used xmlDocument to load the xml into a doc such as Dim doc As New XmlDocument() doc.Load("http://tpdblog.typepad.com/most_wanted/rss.xml") From there I tried many variations of what I thought was the right way only to hit a dead end ... Anyone please point me right here help me get back in the groove please and remind my brain how to parse the doc once I have it loaded All help appreciated .... vbMarkO Quote Visual Basic 2008 Express Edition!
Nate Bross Posted January 19, 2009 Posted January 19, 2009 What version of .Net are you using? IF you are using 3.5 this link might be worth a look. http://weblogs.asp.net/scottgu/archive/2007/08/07/using-linq-to-xml-and-how-to-build-a-custom-rss-feed-reader-with-it.aspx Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Administrators PlausiblyDamp Posted January 25, 2009 Administrators Posted January 25, 2009 That has got to be one of the worst examples of XML I have seen for a while - they really haven't made you job easy by pretty much using html not xml for the feed. To be honest you might find it easier to just load the feed into a string and manually parse the contents rather than using the xml classes. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.