Ok, I've got it. I wasn't aware, that the attrs-param is a reference to an
object, which changes on any call of startElement(...). I thought its always
a new object.

regards
Heiner

-----Urspr�ngliche Nachricht-----
Von: Amthauer, Heiner 
Gesendet am: Mittwoch, 14. August 2002 13:25
An: 'Xerces'
Betreff: 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: [EMAIL PROTECTED]
Internet: http://www.t-systems.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to