<!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> </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 <p 
class="text"> appears in the Drupal page as <p>. In addition, <b> 
and <i> also get stripped off. The result is unformatted text. 
</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>How do I fix this? </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>TIA</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Sue</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2><?php<BR>$file = "whitepapers/overview.xml";<BR>$map_array 
= array(<BR>   "BOLD"    => "B",<BR>   
"EMPHASIS" => "I",<BR>   "LITERAL"  => 
"TT",<BR>   "bold"    => "b",<BR>   
"emphasis" => "i",<BR>   "literal"  => 
"t"<BR>);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>function startElement($parser, $name, $attrs) 
<BR>{<BR>   global $map_array;<BR>   if 
(isset($map_array[$name])) {<BR>       echo 
"<$map_array[$name]>";<BR>   }<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>function endElement($parser, $name) <BR>{<BR>   
global $map_array;<BR>   if (isset($map_array[$name])) 
{<BR>       echo 
"</$map_array[$name]>";<BR>   }<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>function characterData($parser, $data) <BR>{<BR>   
echo $data;<BR>}</FONT></DIV>
<DIV> </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>   
die("could not open XML input");<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>while ($data = fread($fp, 4096)) {<BR>   if 
(!xml_parse($xml_parser, $data, feof($fp))) 
{<BR>       die(sprintf("XML error: %s at line 
%d",<BR>                   
xml_error_string(xml_get_error_code($xml_parser)),<BR>                   
xml_get_current_line_number($xml_parser)));<BR>   
}<BR>}<BR>xml_parser_free($xml_parser);<BR>?> </FONT></DIV></BODY></HTML>