Skip to Content
Java in a Nutshell, 5th Edition
book

Java in a Nutshell, 5th Edition

by David Flanagan
March 2005
Intermediate to advanced
1254 pages
104h 21m
English
O'Reilly Media, Inc.
Content preview from Java in a Nutshell, 5th Edition

Name

Attributes2

Synopsis

This interface extends org.xml.sax.Attributes and adds methods for determining if an attribute was declared in the DTD and whether an attribute value was explicitly specified in the document or whether a default value from the DTD was used. If the SAX implementation supports this interface, the Attributes object passed to the startElement( ) method of the ContentHandler implements this interface. You can also test for support by querying the feature named “http://xml.org/sax/features/use-attributes2” with XMLReader.getFeature( ).

org.xml.sax.ext.Attributes2

Figure 22-7. org.xml.sax.ext.Attributes2

public interface Attributes2 extends org.xml.sax.Attributes {
// Public Instance Methods
     boolean isDeclared(String qName);  
     boolean isDeclared(int index);  
     boolean isDeclared(String uri, String localName);  
     boolean isSpecified(String qName);  
     boolean isSpecified(int index);  
     boolean isSpecified(String uri, String localName);  
}

Implementations

Attributes2Impl

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java in a Nutshell, 8th Edition

Java in a Nutshell, 8th Edition

Benjamin J. Evans, Jason Clark, David Flanagan
Java in a Nutshell, 7th Edition

Java in a Nutshell, 7th Edition

Benjamin J. Evans, David Flanagan
Learning Java, 5th Edition

Learning Java, 5th Edition

Marc Loy, Patrick Niemeyer, Daniel Leuck
Learning Java, 4th Edition

Learning Java, 4th Edition

Patrick Niemeyer, Daniel Leuck

Publisher Resources

ISBN: 0596007736Supplemental ContentErrata Page