I have the code below, I just need help on figuring out the best way to get html from the content node below instead of plaintext. Any help is much appreciated.
sKey = objItem.GetAttribute("id")
Title = objItem.selectSingleNode("title").text
Blurb = objItem.selectSingleNode("blurb").text
Content = objItem.selectSingleNode("content").text
Image = objItem.selectSingleNode("image").text
myDate = objItem.selectSingleNode("date").text
myMonth = objItem.selectSingleNode("month").text
You can get the XML of a node using the
xml
property instead of thetext
property you are using now:Docs here: http://msdn.microsoft.com/en-us/library/ms755989%28v=vs.85%29.aspx
In my experience the best way of handling XML with Classic ASP is to use an XSL stylesheet.
XSLT is quite easy to learn at a basic level, although the learning curve gets a bit steeper later on.
I recommend the w3schools tutorial
http://www.w3schools.com/xsl/
Once you've written your stylesheet, if you have a local XML source your asp code would look like this
If the xml is from a remote url then it's a little more complex
Edit