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 Daniel Pfuhl <da...@web.de> on 2001/06/01 10:49:27 UTC
getElementsByTagNameNS
Hi
I would like to get the number of elements
in my document specified by a namespace.
this is a part of my xml doc:
<?xml version="1.0" encoding="ISO-8859-1"?>
<metaedit xmlns:dcxml="http://tomate/2001/DCXMLSchema">
<categorie name="Beschreibung">
<dcxml:textline label="Titel" id="101">
<value>Titel des Mediums</value>
</dcxml:textline>
<dcxml:textbox label="Beschreibung" id="102">
<value>einfache Beschreibung</value>
</dcxml:textbox>
.....
in my java class i tried to count the <dcxml:??>
elements like this:
int allElNum = doc.getElementsByTagNameNS("http://tomate/2001/DCXMLSchema", "dcxml").getLength();
System.out.println("GesamtElementAnzahl: " + allElNum);
but they will still be "0"
what am I doing wrong ??
thanks in advance
------------------------------------------
Daniel Pfuhl
mailto:daniel@dphome.de
_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org