elementtree terminology + tangential questions

M

mirandacascade

Was prompted to ask these questions when reading the following link:

http://effbot.org/zone/element-infoset.htm#mixed-content

provides a clear explanation of what the tail member is in the
elementtree package.

Questions:
1) In the xml world, is the text between an element's end tag and the
next tag referred to as the "tail"?
2) None of the xml documents to which I've had exposure (a very, very
small set) have had text between an element's end tag and the next tag,
hence the following question: are there some 'best practices' advice
available to help one decide when it's a good idea to put text between
an element's end tag and the next tag as opposed to putting text in the
text property of an element?
3) Are these questions appropriate for the comp.lang.python group, or
should they be directed to a different group?

Thank you.
 
M

Marc 'BlackJack' Rintsch

mirandacascade said:
2) None of the xml documents to which I've had exposure (a very, very
small set) have had text between an element's end tag and the next tag,
hence the following question: are there some 'best practices' advice
available to help one decide when it's a good idea to put text between
an element's end tag and the next tag as opposed to putting text in the
text property of an element?

This depends on the type of document. Examples of xml with text between
tags are XHTML or DocBook. ::

<p>This is an <em>example</em> of "tail text" in
<strong>XHTML</strong>.</p>

Ciao,
Marc 'BlackJack' Rintsch
 
P

Paul McGuire

2) None of the xml documents to which I've had exposure (a very, very
small set) have had text between an element's end tag and the next tag,
Text elements are not limited to printed/visible text. If you parsed a
formatted XML string, I think the indenting whitespace shows up as text
elements between tags.

-- Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,785
Messages
2,569,624
Members
45,318
Latest member
LuisWestma

Latest Threads

Top