Question : XML Displaying odd character

When I translate a simple xml feed from wordpress using classic ASP I get the following character problem: Test ¿ Blah Blah

The diamond with ? is not a desired result.


Here is the XML that I'm using:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/">
	<channel>
		<title>Test</title>
		<item>
			<title>Test – Blah Blah</title>
			<link>http://test.com/</link>
		</item>
	</channel>
</rss>


Here is the XSLT:

1:
2:
3:
4:
5:
6:
7:
8:
9:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0">
<xsl:template match="/">
    <xsl:for-each select="rss/channel/item">
		<a href=""><xsl:value-of select="title"/></a><br /><br />
    </xsl:for-each>
</xsl:template>
</xsl:stylesheet>



And here is the code that I use:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
Dim oXML, oXSL
Set oXML = Server.CreateObject("MSXML2.DOMDocument.3.0")
oXML.setProperty "ServerHTTPRequest", true
oXML.resolveExternals=True
oXML.async = false 
oXML.load(Server.MapPath("test.xml"))
'oXML.Save(Server.MapPath("sanelijolife.xml"))

'Load the XSL from disk
set oXSL = Server.CreateObject("Microsoft.XMLDOM")
oXSL.Async = False
oXSL.Load(Server.MapPath("format.xsl"))

Response.Write(oXML.transformNode(oXSL))

Answer : XML Displaying odd character

See if this helps http://www.w3.org/QA/2002/04/valid-dtd-list.html

You are using <?xml version="1.0" encoding="UTF-8"?>

and that link you show uses


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

Try switching that out in your feed and see what happens.  
Random Solutions  
 
programming4us programming4us