Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 13th, 2006, 03:21 PM
Registered User
Join Date: Mar 2006
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()
      xmlRss2.Document = doc2
      xmlRss2.TransformSource = "rss.xsl"

End Sub

      <form runat="server">

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

*******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 match="channel">
         <a href="{link}" target="_blank"><xsl:value-of select="title" /></a>
         <xsl:apply-templates select="item" />

   <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" />



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

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