You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Amthauer, Heiner" <He...@t-systems.com> on 2002/08/14 13:25:08 UTC

Attributes incomplete?

Hi there!

I'm doing not very exiting things: reading a xml-file using Xerces2 and SAX.
When it comes to the startElement(...)-method, I'll get a set of attributes
inside the attr parameter. Using the debugger shows that it actually
contains a bunch of values. However, using the attr.getLength() or the
attr.getValue(int) methods returns nothing but zero and null. The only way
to access the values is by using the method attr.getValue("whatever-name").
However, this implies that I already do know which attributes are inside
attr. Since not all of them are #REQURIED, I'll have to ask for any single
attribute, whether it is present or not. This is very annoying. I'd preferre
to cycle through. Now, the question is: why are the methods getLength() and
getValue(int) not supported? Is this a bug or a feature? Are there any fixes
to it?

Thanx for any help,
greetings
Heiner


---------------------------------------------------------------
Dipl. Ing. Heiner Amthauer

T-Systems GEI GmbH

Hausanschrift: Magirusstr. 39/1, 89077 Ulm
Postanschrift: Postfach 20 64, 89010 Ulm
Telefon: +49 ( 731) 9344-4422
Telefax: +49 (731) 9344-4409
Mobil: +49 (1 78) 4269335
E-Mail: heiner.amthauer@t-systems.com
Internet: http://www.t-systems.com



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org