473,320 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

elementtree terminology + tangential questions

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

http://effbot.org/zone/element-infos...#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.

Nov 4 '06 #1
2 998
In <11**********************@m73g2000cwd.googlegroups .com>, mirandacascade
wrote:
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</emof "tail text" in
<strong>XHTML</strong>.</p>

Ciao,
Marc 'BlackJack' Rintsch
Nov 4 '06 #2
<mi************@yahoo.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
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
Nov 4 '06 #3

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

Similar topics

7
by: Stewart Midwinter | last post by:
I want to parse a file with ElementTree. My file has the following format: <!-- file population.xml --> <?xml version='1.0' encoding='utf-8'?> <population> <person><name="joe" sex="male"...
1
by: dayzman | last post by:
Hi, Is anyone here familiar with ElementTree by effbot? With <html><body>hello</body></html> how is "hello" stored in the element tree? Which node is it under? Similarly, with: foo <a href =...
1
by: Greg Wilson | last post by:
I'm trying to convert from minidom to ElementTree for handling XML, and am having trouble with entities in DTDs. My Python script looks like this: ...
1
by: mirandacascade | last post by:
I do not understand how to use the find() method in ElementTree. The file 'sample.xml' is: <?xml version="1.0"?> <SampleRoot> <Header> <Product>FindMystery</Product> </Header>...
1
by: mirandacascade | last post by:
O/S: Windows 2K Vsn of Python: 2.4 Currently: 1) Folder structure: \workarea\ <- ElementTree files reside here \xml\ \dom\
15
by: Steven Bethard | last post by:
I'm having trouble using elementtree with an XML file that has some gbk-encoded text. (I can't read Chinese, so I'm taking their word for it that it's gbk-encoded.) I always have trouble with...
7
by: mirandacascade | last post by:
O/S: Windows XP Home Vsn of Python: 2.4 Copy/paste of interactive window is immediately below; the text/questions toward the bottom of this post will refer to the content of the copy/paste ...
0
by: Greg Aumann | last post by:
I am trying to write some python code for a library that reads an XML-like language from a file into elementtree data structures. Then I want to be able to read and/or modify the structure and then...
6
by: royrana | last post by:
Hello, I am working on a problem in which a particle hits a wall and gets reflected. I need to calculate the tangential velocity and the impact angle with the wall. I wrote this: /*for...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.