[Tutor] Injecting Data into XML Files
Kent Johnson
kent37 at tds.net
Mon Sep 11 21:23:53 CEST 2006
William O'Higgins Witteman wrote:
> On Mon, Sep 11, 2006 at 02:38:46PM -0400, Kent Johnson wrote:
>> Note that ET uses the URI of the namespace, not the short name.
>
> That's a huge help, thank you. What would I do if there is no namespace
> for the given documents? I find that a great deal of "XML" content is
> just well-formed ad-hoc-ery, lacking formal definitions and namespaces,
> and so there is no URI to put in the find argument. Do I have to find a
> new module? Thanks again.
I think it will just parse as the tag name in that case; try it and see!
If you have truly bad XML - that is not well-formed so it won't parse
with a correct parser - then you need BeautifulSoup:
http://www.crummy.com/software/BeautifulSoup/documentation.html
Kent
More information about the Tutor
mailing list