public interface StartElement extends XMLEvent
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
Modifier and Type | Method and Description |
---|---|
Attribute |
getAttributeByName(QName name)
返回此名称所指的属性
|
Iterator |
getAttributes()
返回一个迭代器,非命名空间声明的属性在这start_element宣布,返回一个空的迭代器,如果没有属性。
|
QName |
getName()
获取此事件的名称
|
NamespaceContext |
getNamespaceContext()
获取一个只读的命名空间上下文。
|
Iterator |
getNamespaces()
返回这个元素的迭代器声明命名空间。
|
String |
getNamespaceURI(String prefix)
获取该前缀绑定到该元素的上下文中的值。
|
asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
QName getName()
Iterator getAttributes()
Iterator getNamespaces()
迭代器必须包含的javax.xml.stream.namespace接口的实现。
命名空间是一个属性。一个可以遍历列表中的命名空间的属性列表。但这种方法只返回在这start_element声明的命名空间列表不包括属性对这start_element宣布。返回一个空的迭代器,如果没有命名空间。
Attribute getAttributeByName(QName name)
name
-所需的属性名称
NamespaceContext getNamespaceContext()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.