[jQuery] Newbie: Cannot get .text() to work with IE7

[jQuery] Newbie: Cannot get .text() to work with IE7

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>All,<o:p></o:p>
<p class=MsoNormal>I’m new to jQuery, but not JavaScript. I have the
following really simple html file with jQuery-based JavaScript to open, read and
display part of an xml file. It works fine on FF 3.5.2, but does not work on
IE7. Am I missing something really simple to make jQuery work on IE7? Any help
would be great, thanks!<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>Doug Knight<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>Here’s the html/JavaScript:<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal><html><o:p></o:p>
<p class=MsoNormal>                <head><o:p></o:p>
<p class=MsoNormal>                                <title>Read
XML</title><o:p></o:p>
<p class=MsoNormal>                                <script
src="lib/jquery.js" type="text/javascript"
charset="utf-8"></script><o:p></o:p>
<p class=MsoNormal>                                <script
type="text/javascript" charset="utf-8"><o:p></o:p>
<p class=MsoNormal>                                jQuery(function(){
<o:p></o:p>
<p class=MsoNormal>                                //$(document).ready(function(){
<o:p></o:p>
<p class=MsoNormal>                                <o:p></o:p>
<p class=MsoNormal>                                                jQuery.get("test.xml",{},function(xml){<o:p></o:p>
<p class=MsoNormal>                                                //$.get("test.xml",{},function(xml){<o:p></o:p>
<p class=MsoNormal>                                                <o:p></o:p>
<p class=MsoNormal>                                                                DBArea
= '';<o:p></o:p>
<p class=MsoNormal>                                                                //
This displays the values from the XML file<o:p></o:p>
<p class=MsoNormal>                                                                DBArea
+= "xml = :" + xml + ":\n";<o:p></o:p>
<p class=MsoNormal>                                                                //
I get blanks here<o:p></o:p>
<p class=MsoNormal>                                                                DBArea
+= "$(xml).text() = :" + $(xml).text() + ":\n";<o:p></o:p>
<p class=MsoNormal>                                                                //
The following gives [Object Object]<o:p></o:p>
<p class=MsoNormal>                                                                ph_sites
= $(xml).find('product_header_sites');<o:p></o:p>
<p class=MsoNormal>                                                                DBArea
+= "ph_sites = :" + ph_sites + ":\n";<o:p></o:p>
<p class=MsoNormal>                                                                //
And the following gives blanks too<o:p></o:p>
<p class=MsoNormal>                                                                ph_sites
= $(xml).find('product_header_sites').text();<o:p></o:p>
<p class=MsoNormal>                                                                DBArea
+= "ph_sites = :" + ph_sites + ":\n";<o:p></o:p>
<p class=MsoNormal>                                                <o:p></o:p>
<p class=MsoNormal>                                                                //
Update the DIV called Content Area with the HTML string<o:p></o:p>
<p class=MsoNormal>                                                                $("#DebugArea").append("<pre>"
+ DBArea + "</pre>");<o:p></o:p>
<p class=MsoNormal>                                                });<o:p></o:p>
<p class=MsoNormal>                                });<o:p></o:p>
<p class=MsoNormal>                                </script><o:p></o:p>
<p class=MsoNormal>                </head><o:p></o:p>
<p class=MsoNormal>                <body><o:p></o:p>
<p class=MsoNormal>                <div
id="DebugArea"></div><o:p></o:p>
<p class=MsoNormal>                </body><o:p></o:p>
<p class=MsoNormal></html><o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>And here’s the XML file:<o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>    <text_msg><o:p></o:p>
<p class=MsoNormal>       
<product_header><o:p></o:p>
<p class=MsoNormal>           
<product_header_site_id>255</product_header_site_id><o:p></o:p>
<p class=MsoNormal>           
<product_header_node>191</product_header_node><o:p></o:p>
<p class=MsoNormal>           
<product_header_byte_count>332</product_header_byte_count><o:p></o:p>
<p class=MsoNormal>           
<product_header_product_type>2</product_header_product_type><o:p></o:p>
<p class=MsoNormal>           
<product_header_product_status>0</product_header_product_status><o:p></o:p>
<p class=MsoNormal>           
<product_header_sites>F90</product_header_itws_sites><o:p></o:p>
<p class=MsoNormal>       
</product_header><o:p></o:p>
<p class=MsoNormal>    </text_msg><o:p></o:p>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal><o:p> </o:p>
</div>
</body>
</html>