<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Thanks, Jeremy for the leads. Fabulous!</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I also need to be able to display XML without storing it in 
the MySQL database. I am using the code below to load it. This works fine EXCEPT 
that my CSS tags are getting stripped off. A tag in XML that says &lt;p 
class="text"&gt; appears in the Drupal page as &lt;p&gt;. In addition, &lt;b&gt; 
and &lt;i&gt; also get stripped off. The result is unformatted text. 
</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>How do I fix this? </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>TIA</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Sue</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&lt;?php<BR>$file = "whitepapers/overview.xml";<BR>$map_array 
= array(<BR>&nbsp;&nbsp; "BOLD"&nbsp;&nbsp;&nbsp; =&gt; "B",<BR>&nbsp;&nbsp; 
"EMPHASIS" =&gt; "I",<BR>&nbsp;&nbsp; "LITERAL"&nbsp; =&gt; 
"TT",<BR>&nbsp;&nbsp; "bold"&nbsp;&nbsp;&nbsp; =&gt; "b",<BR>&nbsp;&nbsp; 
"emphasis" =&gt; "i",<BR>&nbsp;&nbsp; "literal"&nbsp; =&gt; 
"t"<BR>);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>function startElement($parser, $name, $attrs) 
<BR>{<BR>&nbsp;&nbsp; global $map_array;<BR>&nbsp;&nbsp; if 
(isset($map_array[$name])) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 
"&lt;$map_array[$name]&gt;";<BR>&nbsp;&nbsp; }<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>function endElement($parser, $name) <BR>{<BR>&nbsp;&nbsp; 
global $map_array;<BR>&nbsp;&nbsp; if (isset($map_array[$name])) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 
"&lt;/$map_array[$name]&gt;";<BR>&nbsp;&nbsp; }<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>function characterData($parser, $data) <BR>{<BR>&nbsp;&nbsp; 
echo $data;<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>$xml_parser = xml_parser_create();<BR>// use case-folding so 
we are sure to find the tag in $map_array<BR>xml_parser_set_option($xml_parser, 
XML_OPTION_CASE_FOLDING, true);<BR>xml_set_element_handler($xml_parser, 
"startElement", "endElement");<BR>xml_set_character_data_handler($xml_parser, 
"characterData");<BR>if (!($fp = fopen($file, "r"))) {<BR>&nbsp;&nbsp; 
die("could not open XML input");<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>while ($data = fread($fp, 4096)) {<BR>&nbsp;&nbsp; if 
(!xml_parse($xml_parser, $data, feof($fp))) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; die(sprintf("XML error: %s at line 
%d",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
xml_error_string(xml_get_error_code($xml_parser)),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
xml_get_current_line_number($xml_parser)));<BR>&nbsp;&nbsp; 
}<BR>}<BR>xml_parser_free($xml_parser);<BR>?&gt; </FONT></DIV></BODY></HTML>