Parse reserved attributes as normal attributes

M

Max

Hello everyone!

I would want to know if reserved attributes (xml:lang, xml:space,
xmlns:prefix etc.) are parsed and registered as normal attributes.
As an example:

xmlns:cc="http://namespace"

attr name = "xmlns:cc"
attr prefix = "xmlns"
attr localName = "cc"

Thanks,

Max
 
J

Joe Kesselman

Max said:
I would want to know if reserved attributes (xml:lang, xml:space,
xmlns:prefix etc.) are parsed and registered as normal attributes.

Depends on the parser and data model you're using.

The DOM displays all of these as normal attribute nodes.

The XPath data model considers namespace declarations a different kind
of node.

SAX presents namespace declarations either as separate namespace events
or as attributes or both depending on which switches you set on the
parser and which events your code is actively listening for.

Check the specs for the specific API you're using, and/or pick one that
matches the task you're trying to perform.
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top