Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 13th, 2006, 03:21 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default parse error xml load document asp.net

Hey ASP.NET Wizards,

I am very unsophisticated, so apologies in advance for the simplicity of this problem. I am parsing xml feeds with asp.net. This week one of the RSS XML feeds from remote web site went out and threw my whole page out. I would like to error check the xml before I transform it and send it through. The code is basic. Can I do this on my transform xsl stylesheet? Below is the code and below that is the xsl stylesheet. Thanks,

<script runat="server">
   Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

      Dim doc2 As System.Xml.XmlDocument = New System.Xml.XmlDocument()
      doc2.Load("http://www.michellemalkin.com/index.xml")
      xmlRss2.Document = doc2
      xmlRss2.TransformSource = "rss.xsl"


End Sub
</script>

<html>
   <body>
      <form runat="server">

       <asp:xml id="xmlRss2" runat="server" />

      </form>
   </body>
</html>
*******style sheet********
 <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:template match="/">
      <xsl:apply-templates select="rss/channel" />
   </xsl:template>

   <xsl:template match="channel">
      <h2>
         <a href="{link}" target="_blank"><xsl:value-of select="title" /></a>
      </h2>
      [list]
         <xsl:apply-templates select="item" />
      </ul>
   </xsl:template>

   <xsl:template match="item">

         <a href="{link}" target="_blank"><xsl:value-of select="title" /></a>
         - <xsl:value-of select="pubDate" />
         <br />
         <xsl:value-of disable-output-escaping="yes" select="description" />

     <p/>

   </xsl:template>
</xsl:stylesheet>

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Parse Error - OBJECT REQUIRED?!? kevorkian XML 3 November 29th, 2007 02:53 PM
PHP Parse error: parse error, unexpected T_STRING geminient PHP How-To 4 August 18th, 2007 02:27 AM
Parse/Load/Search xml file size near about 1 GB sandeep_akhare XML 4 September 19th, 2006 04:47 AM
Parse XML in ASP delaneyp Classic ASP XML 1 February 6th, 2006 08:42 AM
Parse XML doc using VB.NET into ASP.NET page kwilliams Classic ASP XML 17 November 11th, 2005 10:42 AM



All times are GMT -4. The time now is 02:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.