473,508 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

most complete xml package for Python?

Without even checking them all out, I'm thinking the Amara XML Toolkit
must be the most feature-packed. The developers are readily available
on IRC for support and they seem to make regular releases.

As a meld3 user, I have been using ElementTree under the hood, but was
dismayed to find out that you can't find elements by attribute and I
am finding it difficult to remove elements.

So I am out shopping for a new friend to grok XML.

Input welcome.

Mar 13 '07 #1
12 1153
On Mar 13, 1:43 pm, "metaperl" <metap...@gmail.comwrote:
Without even checking them all out, I'm thinking the Amara XML Toolkit
must be the most feature-packed. The developers are readily available
on IRC for support and they seem to make regular releases.

As a meld3 user, I have been using ElementTree under the hood, but was
dismayed to find out that you can't find elements by attribute and I
am finding it difficult to remove elements.
Hardly in competition with Amara or lxml, but I wrote this extension
to ElementTree which handles attributes to a limited extent:

http://gflanagan.net/site/python/utils/elementfilter/

(Be aware that parts of the filter string are 'eval-ed')

Gerard
Mar 13 '07 #2
metaperl wrote:
Without even checking them all out, I'm thinking the Amara XML Toolkit
must be the most feature-packed.
Please check out lxml before you post FUD like this.

http://codespeak.net/lxml/

Regards,
Stefan
Mar 14 '07 #3
On 14 Mar, 16:15, Stefan Behnel <stefan.behnel-n05...@web.dewrote:
metaperl wrote:
Without even checking them all out, I'm thinking the Amara XML Toolkit
must be the most feature-packed.

Please check out lxml before you post FUD like this.

http://codespeak.net/lxml/
Calm down, Stefan! The inquirer must have got the impression of
Amara's superiority from somewhere; all you need to do is to discover
which resource gave that impression and balance the situation out. In
any case, it's an opinion: there's no fear involved, and the only
uncertainty and doubt are in the inquirer's mind, which I suppose is
why they posted the inquiry.

Paul

Mar 14 '07 #4
Paul Boddie wrote:
On 14 Mar, 16:15, Stefan Behnel <stefan.behnel-n05...@web.dewrote:
>metaperl wrote:
>>Without even checking them all out, I'm thinking the Amara XML Toolkit
must be the most feature-packed.
Please check out lxml before you post FUD like this.

http://codespeak.net/lxml/

Calm down, Stefan! The inquirer must have got the impression of
Amara's superiority from somewhere; all you need to do is to discover
which resource gave that impression and balance the situation out. In
any case, it's an opinion: there's no fear involved, and the only
uncertainty and doubt are in the inquirer's mind, which I suppose is
why they posted the inquiry.
Although the phrase "without even checking them all out" hardly lends
credence to the OP's assertion of Amara's superiority, and does tend to
support a hypothesis involving some ulterior motive (or would if less
ingenuously done).

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Blog of Note: http://holdenweb.blogspot.com
See you at PyCon? http://us.pycon.org/TX2007

Mar 14 '07 #5
On Mar 15, 3:45 am, Steve Holden <s...@holdenweb.comwrote:
Paul Boddie wrote:
On 14 Mar, 16:15, Stefan Behnel <stefan.behnel-n05...@web.dewrote:
metaperl wrote:
Without even checking them all out, I'm thinking the Amara XML Toolkit
must be the most feature-packed.
Please check out lxml before you post FUD like this.
>http://codespeak.net/lxml/
Calm down, Stefan! The inquirer must have got the impression of
Amara's superiority from somewhere; all you need to do is to discover
which resource gave that impression and balance the situation out. In
any case, it's an opinion: there's no fear involved, and the only
uncertainty and doubt are in the inquirer's mind, which I suppose is
why they posted the inquiry.

Although the phrase "without even checking them all out" hardly lends
credence to the OP's assertion of Amara's superiority, and does tend to
support a hypothesis involving some ulterior motive (or would if less
ingenuously done).
Given keywords like "Amara" and "Elementtree" and past history, it
looked to me like a troll of one kind trying to incite a troll of
another kind to pop out from under the bridge and chew on his
ankle :-)
Mar 14 '07 #6
On Mar 14, 5:34 pm, "John Machin" <sjmac...@lexicon.netwrote:

>
Given keywords like "Amara" and "Elementtree" and past history, it
looked to me like a troll of one kind trying to incite a troll of
another kind to pop out from under the bridge and chew on his
ankle :-)
Well, I'm not a troll. And I am now even less impressed with
ElementTree. It does not preserve the document but reforms it in
certain cases.

<script></script>

gets rewritten as

<script />

which leads to problems when embedding Dojo Rich Text Editors.
Mar 14 '07 #7
In <11**********************@n76g2000hsh.googlegroups .com>, metaperl
wrote:
Well, I'm not a troll. And I am now even less impressed with
ElementTree. It does not preserve the document but reforms it in
certain cases.

<script></script>

gets rewritten as

<script />

which leads to problems when embedding Dojo Rich Text Editors.
So those editors have some problem with XML. I'm not impressed
by such code. ;-)

It's like complaining about:

In [100]: '\x61'
Out[100]: 'a'

It's the same information, just a different representation. Both are
within the specs.

Ciao,
Marc 'BlackJack' Rintsch
Mar 14 '07 #8
On Mar 15, 9:04 am, "metaperl" <metap...@gmail.comwrote:
On Mar 14, 5:34 pm, "John Machin" <sjmac...@lexicon.netwrote:
Given keywords like "Amara" and "Elementtree" and past history, it
looked to me like a troll of one kind trying to incite a troll of
another kind to pop out from under the bridge and chew on his
ankle :-)

Well, I'm not a troll. And I am now even less impressed with
ElementTree. It does not preserve the document but reforms it in
certain cases.

<script></script>

gets rewritten as

<script />

which leads to problems when embedding Dojo Rich Text Editors.
As BlackJack has pointed out, that's syntactically equivalent. If that
bothers you, best you don't check out what it does with namespace
prefixes.

Mar 15 '07 #9
On 14 Mar, 17:45, Steve Holden <s...@holdenweb.comwrote:
>
Although the phrase "without even checking them all out" hardly lends
credence to the OP's assertion of Amara's superiority, and does tend to
support a hypothesis involving some ulterior motive (or would if less
ingenuously done).
It's an opinion being expressed, qualified with evidence to show that
it's weakly substantiated. Hardly a reason to "call FUD" or to suspect
an astroturfing campaign - FUD being one of the most readily used
terms (and consequently one of the most overused or inappropriately
used terms) when people disagree in the technology domain, anyway.

If the inquirer has it wrong, a gentle process of education is
necessary, although it should be noted that the process does involve
listening to their account of what they are trying to achieve rather
than telling them that they are stupid for using a particular tool or
other.

Paul

Mar 15 '07 #10
metaperl schrieb:
On Mar 14, 5:34 pm, "John Machin" <sjmac...@lexicon.netwrote:

>Given keywords like "Amara" and "Elementtree" and past history, it
looked to me like a troll of one kind trying to incite a troll of
another kind to pop out from under the bridge and chew on his
ankle :-)

Well, I'm not a troll. And I am now even less impressed with
ElementTree. It does not preserve the document but reforms it in
certain cases.

<script></script>

gets rewritten as

<script />

which leads to problems when embedding Dojo Rich Text Editors.
Beside the fact that this is a problem of browsers (which won't help you
much, as you have to deal with this somehow, blaming browsers alone
isn't solving problems I'm just too aware of), I wonder: which XML
framework _does_ preserve such tags?

I can't imagine a way of doing so as a DOM node is a DOM node. I could
only create a custom renderer for HTML to circumvene that specific
pitfall - but then, you could also create a post-rendering filter
regex-based that expands the script-tags

Diez
Mar 15 '07 #11
Diez B. Roggisch wrote:
metaperl schrieb:

Well, I'm not a troll. And I am now even less impressed with
ElementTree. It does not preserve the document but reforms it in
certain cases.

<script></script>

gets rewritten as

<script />

which leads to problems when embedding Dojo Rich Text Editors.

Beside the fact that this is a problem of browsers (which won't help you
much, as you have to deal with this somehow, blaming browsers alone
isn't solving problems I'm just too aware of), I wonder: which XML
framework _does_ preserve such tags?
I can't remember exactly how I solved this within an XML/XSLT-heavy
Java-based framework, mostly to satisfy Internet Explorer if I
remember correctly, but it does lead to some fairly inelegant hacks.
Something like this might work:

<script><![CDATA[]]></script>

I note that such things are mentioned here (the first search result
for "CDATA" when I tried):

http://www.w3schools.com/xml/xml_cdata.asp

Paul

P.S. I'm off to fix CDATA support in libxml2dom, but I'm sure lxml
supports CDATA. Not sure about Amara, though. ;-)

Mar 15 '07 #12
On Mar 15, 5:45 pm, "Paul Boddie" <p...@boddie.org.ukwrote:

>
I can't remember exactly how I solved this within anXML/XSLT-heavy
Java-based framework,
I just put a single space between:

<script</script>

and then it kept the XML container-style as opposed to single-tag.

Mar 18 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1002
by: C. Barnes | last post by:
OK, here's the setup: package/ __init__.py X.py python/lib/ X.py Now inside package, we want to import the copy
8
2050
by: Georg Brandl | last post by:
Hello c.l.py, what features would you expect of a Python package manager, similar to CPAN or rubygems? I am currently planning to write such a thing, at first privately for myself, and if...
0
1360
by: Mark English | last post by:
Basic problem: If there is a C-extension module in a package and it tries to import another python module in the same package without using the fully qualified path, the import fails. Config:...
122
7741
by: seberino | last post by:
I'm interested in knowing which Python web framework is most like Ruby on Rails. I've heard of Subway and Django. Are there other Rails clones in Python land I don't know about? Which one...
11
3835
by: fortepianissimo | last post by:
Say I have the following package organization in a system I'm developing: A |----B |----C |----D I have a module, say 'foo', that both package D and B require. What is the best practice in...
14
1556
by: ToddLMorgan | last post by:
Summary: How should multiple (related) projects be arranged (structured) and configured so that the following is possible: o Sharing common code (one of the projects would be a "common" project...
9
3744
by: Jack | last post by:
Installing a Python package is easy, most of time just "Setup.py install" However, setup.py doesn't seem to support an uninstall command. If I want to delete a package that I do not use any more,...
8
1708
by: | last post by:
The New York Times and many other online publications automatically generate "most popular article" lists that cover, say, the last 24 hours. I am looking for guidance and/or code on the best way...
12
2232
by: Fett | last post by:
I need a crypto package that works on windows with python 2.5. Can anyone suggest one for me? I have been searching for a couple days for a good cryptography package to use for public/private...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5640
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.