What do you mean by well-formed?  What is required to make XML well formed?<br>
<br>
-Greg<br>
<br><br><div><span class="gmail_quote">On 10/26/05, <b class="gmail_sendername">John Abel</b> <<a href="mailto:jabel@plus.net">jabel@plus.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Try this page:<br><br><a href="http://docs.python.org/lib/module-xml.sax.saxutils.html">http://docs.python.org/lib/module-xml.sax.saxutils.html</a><br><br>I've just tried the code, taking out the &nbsp, and adding in the belo,
<br>as the XML is not well formed, otherwise.<br><br><?xml version="1.0" encoding="ISO-8859-15"?><br><br>The code then works.<br><br>HTH<br><br>J<br><br>Gregory Piñero wrote:<br><br>> Should I try some sort of XML group instead?  I'm still stuck on this.
<br>><br>> -Greg<br>><br>><br>> On 10/25/05, *Gregory Piñero* <<a href="mailto:gregpinero@gmail.com">gregpinero@gmail.com</a><br>> <mailto:<a href="mailto:gregpinero@gmail.com">gregpinero@gmail.com
</a>>> wrote:<br>><br>>     Hi guys,<br>><br>>     I was hoping some XML expert could help me make this code work.<br>>     Below is sample code with sample XML similar to what I'm dealing with.<br>>
<br>>     How can I make the weird characters in the XML not break the<br>>     parser?  I'll do anything to make this work!<br>><br>>     (Note: the &nbsp; broke my parser yesterday but doesn't seem to in
<br>>     this sample code)  But really I'm looking for solutions that will<br>>     handles lots<br>>     of unusual characters.<br>><br>>     Much thanks,<br>><br>>     Greg<br>><br>><br>>     <code>
<br>>     from xml.dom.minidom import parseString<br>>     data="""<br>>     <blog><br>>     <post><br>>     This is sample problem text. &nbsp; £500.00<br>>     </post>
<br>>     </blog><br>>     """<br>>     myDOM=parseString(data)<br>>     </code><br>><br>>     <error><br>>     Traceback (most recent call last):<br>>       File<br>
>     "C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",<br>>     line 307, in RunScript<br>>         debugger.run(codeObject, __main__.__dict__, start_stepping=0)<br>>       File
<br>>     "C:\Python23\Lib\site-packages\pythonwin\pywin\debugger\__init__.py",<br>>     line 60, in run<br>>         _GetCurrentDebugger().run(cmd, globals,locals, start_stepping)<br>>       File<br>
>     "C:\Python23\Lib\site-packages\pythonwin\pywin\debugger\debugger.py",<br>>     line 631, in run<br>>         exec cmd in globals, locals<br>>       File "C:\Documents and Settings\Gregory\My Documents\Python\xml
<br>>     help\xmlproc.py", line 9, in ?<br>>         myDOM=parseString(data)<br>>       File "C:\Python23\lib\xml\dom\minidom.py", line 1929, in parseString<br>>         return expatbuilder.parseString
(string)<br>>       File "C:\Python23\lib\xml\dom\expatbuilder.py", line 940, in<br>>     parseString<br>>         return builder.parseString(string)<br>>       File "C:\Python23\lib\xml\dom\expatbuilder.py", line 223, in
<br>>     parseString<br>>         parser.Parse(string, True)<br>>     ExpatError: undefined entity: line 4, column 29<br>>     </error><br>><br>><br>><br>>     --<br>>     Gregory Piñero<br>
>     Chief Innovation Officer<br>>     Blended Technologies<br>>     (<a href="http://www.blendedtechnologies.com">www.blendedtechnologies.com</a> <<a href="http://www.blendedtechnologies.com">http://www.blendedtechnologies.com
</a>>)<br>><br>><br>><br>><br>> --<br>> Gregory Piñero<br>> Chief Innovation Officer<br>> Blended Technologies<br>> (<a href="http://www.blendedtechnologies.com">www.blendedtechnologies.com</a>
 <<a href="http://www.blendedtechnologies.com">http://www.blendedtechnologies.com</a>>)<br><br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Gregory Piñero<br>Chief Innovation Officer<br>Blended Technologies<br>(<a href="http://www.blendedtechnologies.com">www.blendedtechnologies.com</a>)