| Method from com.sun.org.apache.xml.internal.utils.AttList Detail: |
public int getIndex(String qName) {
for(int i=m_attrs.getLength()-1;i >=0;--i)
{
Node a=m_attrs.item(i);
if(a.getNodeName().equals(qName) )
return i;
}
return -1;
}
Look up the index of an attribute by raw XML 1.0 name. |
public int getIndex(String uri,
String localPart) {
for(int i=m_attrs.getLength()-1;i >=0;--i)
{
Node a=m_attrs.item(i);
String u=a.getNamespaceURI();
if( (u==null ? uri==null : u.equals(uri))
&&
a.getLocalName().equals(localPart) )
return i;
}
return -1;
}
Look up the index of an attribute by Namespace name. |
public int getLength() {
return m_attrs.getLength();
}
Get the number of attribute nodes in the list |
public String getLocalName(int index) {
return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index)));
}
Look up an attribute's local name by index. |
public String getQName(int i) {
return ((Attr) m_attrs.item(i)).getName();
}
Look up an attribute's qualified name by index. |
public String getType(int i) {
return "CDATA"; // for the moment
}
Get the attribute's node type by index |
public String getType(String name) {
return "CDATA"; // for the moment
}
Get the attribute's node type by name |
public String getType(String uri,
String localName) {
return "CDATA"; // for the moment
}
Look up an attribute's type by Namespace name. |
public String getURI(int index) {
String ns = m_dh.getNamespaceOfNode(((Attr) m_attrs.item(index)));
if(null == ns)
ns = "";
return ns;
}
Look up an attribute's Namespace URI by index. |
public String getValue(int i) {
return ((Attr) m_attrs.item(i)).getValue();
}
Get the attribute's node value by index |
public String getValue(String name) {
Attr attr = ((Attr) m_attrs.getNamedItem(name));
return (null != attr)
? attr.getValue() : null;
}
Look up an attribute's value by name. |
public String getValue(String uri,
String localName) {
Node a=m_attrs.getNamedItemNS(uri,localName);
return (a==null) ? null : a.getNodeValue();
}
Look up an attribute's value by Namespace name. |