You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Jo...@lotus.com on 2000/06/14 15:40:30 UTC
Re: case insensitive retrieval of attribute names
>Is there a way to get this call to get Named Items case insensitive?
Sorry. XML is defined as being case-sensitive. The DOM really isn't allowed
to ignore case, and you really shouldn't be designing a language that asks
it to.
If you really need this behavior, I can see two solutions.
1) Fold your document to a single case before parsing it.
2) Use the item() accessor for NamedNodeMaps to manually walk through all
the attributes of this element, and perform your own case-insensitive test
of their names.
Note that either of these is likely to badly confuse anyone you are
exchanging XML files with, since they would have no reason to expect your
document to be case-insensitive.
REMINDER: XML USES UNICODE. Don't assume that you can just flip one bit to
convert between cases!