public class XmlNode extends HashMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log |
| Modifier | Constructor and Description |
|---|---|
protected |
XmlNode(String name,
XmlNode parent)
Constructor that defines name and connects to specified
parent element.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value)
Adds new attribute with specified name and value.
|
void |
addElement(String value)
Adds new textBuff to element list
|
void |
addElement(XmlNode elementNode)
Adds new subelement.
|
Object |
get(Object key)
Overriden get method - search both subelements and attributes
|
String |
getAttribute(String attName) |
Map |
getAttributes() |
int |
getColumnNumber() |
Object |
getElement(String name) |
List |
getElementList() |
static XmlNode |
getInstance(InputSource in)
Static method that creates node for specified input source which
contains XML data
|
int |
getLineNumber() |
String |
getName() |
XmlNode |
getParent() |
String |
getString(Object key) |
String |
getText() |
void |
print()
Prints instance in treelike form to the default output.
|
void |
setLocation(int lineNumber,
int columnNumber) |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic static XmlNode getInstance(InputSource in)
in - public String getName()
public String getText()
public XmlNode getParent()
public void addAttribute(String name, String value)
name - value - public Map getAttributes()
public void addElement(XmlNode elementNode)
elementNode - public void addElement(String value)
value - public List getElementList()
public void print()
public void setLocation(int lineNumber,
int columnNumber)
public int getLineNumber()
public int getColumnNumber()
Copyright © 2022 WSO2. All rights reserved.