[Twisted-web] xml library in twisted

Phil Christensen phil at bubblehouse.org
Tue Mar 4 11:00:43 EST 2008


On Mar 4, 2008, at 9:17 AM, Raj kumar wrote:
> Hi all,
> I'm dealing with xml files in a twisted application,
> can any one suggest me the best xml library in twisted?
> Previously i used  twisted.web.microdom and twisted.web.minidom but  
> they don't have much of the functionalities....
> Is there any other xml library in twisted which makes it easy with  
> lot of options?
> I wanted to create a xml file like this...
[snip snip snip]
> and want to access that player stuff directly..(like a tree structure)
>
> Thank you in advance.

Hi Raj,

What kind of functionality do you feel is missing from microdom? I've  
been using that myself with much success, although I didn't have much  
of a need for speed or XML-specific features (validation, etc).

Another thing to consider is whether you really need to parse the XML  
properly at all. If you're dealing with XML because you're getting  
some sort of datafile from a third party, and it's as simple as the  
one you described in your email, you might consider just using regular  
expressions to get the data you need.

That might be heresy among XML fanatics, but it's done the trick for  
me on quite a few occasions.

-phil



More information about the Twisted-web mailing list