+ Reply to Thread
Results 1 to 2 of 2

Thread: Displaying XML from external website

  1. #1
    zekyl is offline VB.NET Forum Newbie zekyl is on a distinguished programming path ahead
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    May 2009
    Posts
    2
    Reputation
    0

    Default Displaying XML from external website

    I'm trying to display XML data from a Twitter Search on our company site. We use VB.NET for everything (no PHP) and Twitter Searches use Atom instead of RSS, making things difficult on me. As of now, my XSL is:

    -------
    HTML Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:twitter="http://api.twitter.com/" 
    xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
    	<xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
     
    	<xsl:template match="/">
     
    		<html xmlns="http://www.w3.org/1999/xhtml">
    			<head>
    				<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    				<title>Test</title>
    			</head>
     
    			<body>
    				<h2>
    					<xsl:value-of  select="atom:feed/atom:title"/>
    				</h2>
    				<table>
    					<xsl:for-each select="atom:feed/atom:entry">
    						<tr>
    							<td>
    								<xsl:value-of  select="atom:title"/>
    							</td>
    						</tr>
    					</xsl:for-each>
    				</table>
    			</body>
    		</html>
     
    	</xsl:template>
    </xsl:stylesheet>
    -------

    My regular code is:

    -------
    HTML Code:
    <%@ Page Language="VB" %>
    
    <%
    Dim transform As New System.Xml.Xsl.XslCompiledTransform()
     
    transform.Load("http://.........../TwitterTest.xsl")
     
    transform.Transform("http://search.twitter.com/search.atom?q=ducks", Nothing, Response.OutputStream)
    %>
    -------

    The search for Ducks is just a placeholder for now. I wanted to keep it simple to get things up and running.

    When I load the page, I get a Runtime Error. We have security settings that keep me from getting any feedback from the error.

    Any help/advice/solutions/resources would be greatly appreciated. I'm fairly new to the coding world so this project has taught me quite a bit.

  2. #2
    zekyl is offline VB.NET Forum Newbie zekyl is on a distinguished programming path ahead
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    May 2009
    Posts
    2
    Reputation
    0

    Default

    Addition:

    I tried removing the security on our runtime errors. I went into the web.config file, found the customErrors setting, but it was already set to <customErrors mode="Off"/>

    I tried adding a try-catch to find the snag, which brought back the following error:

    "The remote server returned an error: (401) Unauthorized."

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts