Patrick Maupin wrote:
"""
Dennis Bieber wrote:
> Off hand, I'd consider the non-binary nature to be because the
> internet protocols are mostly designed for text, not binary.
A document at http://www.w3.org/TR/REC-xml/ lists "the design goals for
XML".
One of the listed goals is "XML documents sh
Dennis Bieber wrote:
> Off hand, I'd consider the non-binary nature to be because the
> internet protocols are mostly designed for text, not binary.
A document at http://www.w3.org/TR/REC-xml/ lists "the design goals for
XML".
One of the listed goals is "XML documents should be human-legible and
Matthew Thorley wrote:
> from elementtree import ElementTree as et
>
> xmla = et.ElementTree('some_file.xml')
> xmlb = et.Element('parent')
> et.SubElement(xmlb, 'child1')
> et.SubElement(xmlb, 'child2')
>
> root = et.Element('root')
> root.append(xmla.getroot())
> root.append(xmlb)
>
> print et
Jarek Zgoda wrote:
> Why want you to read an XML document "by hand"? It's a "machine related"
> data chunk.
>
I see this attitude all the time, and frankly I don't understand it.
Please explain why XML is in ASCII/unicode instead of binary. Is it
because it is easier for a machine to parse? No,
Matthew Thorley wrote:
> Greetings, perhaps someone can explain this. I get to different styles
> of formatting for xmla and xmlb when I do the following:
>
> Is that because the some_file.xml is already nicely formatted? I thought
> that the formatting was ignored when creating new elements.
E
Jarek Zgoda wrote:
> Matthew Thorley napisał(a):
>
>> The output I get shows xmla as nicely formatted text, with elements on
>> different lines and everything all tabbed and pretty. Inverly, xmlb is
>> one long string on one line.
>>
>> Is that because the some_file.xml is already nicely formatt
Matthew Thorley napisał(a):
> The output I get shows xmla as nicely formatted text, with elements on
> different lines and everything all tabbed and pretty. Inverly, xmlb is
> one long string on one line.
>
> Is that because the some_file.xml is already nicely formatted? I thought
> that the f
Greetings, perhaps someone can explain this. I get to different styles
of formatting for xmla and xmlb when I do the following:
from elementtree import ElementTree as et
xmla = et.ElementTree('some_file.xml')
xmlb = et.Element('parent')
et.SubElement(xmlb, 'child1')
et.SubElement(xmlb, 'child2')