[
Lists Home |
Date Index |
Thread Index
]
On Thu, 2002-01-24 at 22:56, Paul Prescod wrote:
> How can you process XML from anywhere other than the beginning? Not only
> would you have missed entity references and potential namespace
> declarations, you wouldn't know whether you were in the middle of a
> CDATA section.
It's plausible - though not especially bright - in SAX processing.
Using the NamespaceSupport class can avoid most of the namespace mayhem,
but not everyone knows to do that or does so.
Grabbing nodes out of the middle of a DOM tree could have similar
consequences, but at least the tree is there for inspection.
I can imagine scenarios where an application would grab text out of the
middle of an XML document based on some indexing scheme, but I'd hope it
was unlikely.
--
Simon St.Laurent
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!
http://simonstl.com
|