Chris Spencer:
Fredrik Lundh wrote:
Chris Spencer wrote:
If an XML parser reads in and then writes out a document without having
altered it, then the new document should be the same as the original.
says who?
Good question. There is no One True Answer even within the XML
standards.
It
Jarek Zgoda wrote:
[snip]
It's a shame the default ns behavior in Elementtree is in such a poort
staten. I'm surprised no one's forked Elementtree solely to fix this
issue.
There is at least one ElementTree API implementation that retains
prefixes, lxml.ETree. Go google for it.
Just to
you forgot
http://effbot.org/zone/element-infoset.htm
which describes the 3-node XML infoset subset used by ElementTree.
No, I did not forget your infoset subset. I was comparing it with other
infoset subsets described in various XML specifications.
I agree 100% that prefixes were not
Chris Spencer wrote:
If an XML parser reads in and then writes out a document without having
altered it, then the new document should be the same as the original.
says who?
With Elementtree this isn't so. Lundh apparently believes he knows
better than you and I on how our namespaces should
Fredrik Lundh wrote:
Chris Spencer wrote:
If an XML parser reads in and then writes out a document without having
altered it, then the new document should be the same as the original.
says who?
Good question. There is no One True Answer even within the XML
standards.
It all boils down to
Oren Tirosh wrote:
It all boils down to how you define the same. Which parts of the XML
document are meaningful content that needs to be preserved and which
ones are mere encoding variations that may be omitted from the internal
representation?
Some relevant references which may be used as
Does anyone know how to make ElementTree preserve namespace prefixes in
parsed xml files? The default behavior is to strip a document of all
prefixes and then replace them autogenerated prefixes like ns0, ns1,
etc. The correct behavior should be to write the file in the form that
it was read,
On Sun, 12 Jun 2005 15:06:18 +, Chris Spencer wrote:
Does anyone know how to make ElementTree preserve namespace prefixes in
parsed xml files?
See the recent c.l.python thread titled ElemenTree and namespaces
and started May 16 2:03pm. One archive is at
Andrew Dalke wrote:
On Sun, 12 Jun 2005 15:06:18 +, Chris Spencer wrote:
Does anyone know how to make ElementTree preserve namespace prefixes in
parsed xml files?
See the recent c.l.python thread titled ElemenTree and namespaces
and started May 16 2:03pm. One archive is at
Chris Spencer napisa(a):
Given xml with no namespaces, Elementtree works perfectly. However, if
you give the root tag an xmlns attribute, Elementtree relabels all child
nodes with it's own prefix, completely defeating the purpose of the
default namespace. In my opinion, this is
10 matches
Mail list logo