[XML-SIG] SAX: distinguising empty and non-empty elements?

BudP.Bruegger BudP.Bruegger
Wed, 21 Aug 2002 10:04:18 +0200


[Hope this isn't an FAQ, searching on the web I came up w/o a conclusive
answer]

Is there a possibility to distinguish between non-empty elements w/o
content
and empty elements in (Python) Sax?  I found the following text in Sun's
sax
tutorial
(http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html): 
  

<quote>
The single-tag empty element you defined (<item/>) is treated exactly
the same
as a two-tag empty element (<item></item>). It is, for all intents and
purposes, identical. (It's just easier to type and consumes less space.)
</quote>

Does this apply only to the example app that echoes an xml file using a
sax
parser or is it general?  Any differences between Java and Python?

Many thanks for your help

--bud

/-----------------------------------------------------------------
| Bud P. Bruegger, Ph.D. 
| Sistema (www.sistema.it)
| Via U. Bassi, 54
| 58100 Grosseto, Italy
| +39-0564-411682 (voice and fax)
\-----------------------------------------------------------------