O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Element extensions

The Element interface retains the original methods:

					String   getTagName();
					NodeList getElementsByTagName( String name );
					void     normalize();
					String   getAttribute( String name );
					void     setAttribute( String name, String value )
					throws DOMException;
					void     removeAttribute( String name )
					throws DOMException;
					Attr     getAttributeNode( String name );
					void     setAttributeNode( Attr newAttr )
					throws DOMException;
					void     removeAttributeNode( Attr OldAttr )
					throws DOMException;
				

A number of new methods have been added to handle namespaces, and one other has been added to discover if a particular attribute is present:

 boolean hasAttribute(String name); boolean hasAttributeNS(String namespaceURI, String localName); String getAttributeNS(String namespaceURI, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required