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
standard
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.
> 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 no
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 u
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
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 shou
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 unaccep
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
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
http://groups-beta.google.co
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, w
10 matches
Mail list logo