[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] re: counting attributes
Avinash Subramanya writes: > How do I get a count of the number of attributes of an element? > > ex: > <Property prop1="val1" prop2="val2" /> > > Count should give me 2. In SAX, under Java, use the Attributes.getLength() method. In DOM, under Java, use the NamedNodeMap.getLength() method. There are, of course, many, many other interfaces for many other languages. What, exactly, did you have in mind? All the best, David -- David Megginson, david@m..., http://www.megginson.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|