public class XmlNode extends Object implements Comparable<XmlNode>
| Modifier and Type | Class and Description |
|---|---|
static class |
XmlNode.StringInputStream
Leitor de String em UTF8
|
| Constructor and Description |
|---|
XmlNode(InputStream input,
boolean onlyHeader)
Construtor
|
XmlNode(String name)
Construtor
|
public XmlNode(String name)
name - public XmlNode(InputStream input, boolean onlyHeader) throws ParseException, IOException
input - onlyHeader - ParseExceptionIOExceptionpublic String getName()
public boolean hasAttribute(String attribute)
attribute - public String getAttribute(String attribute)
attribute - public Integer getAttribute(String attribute, Integer defaultValue)
attribute - defaultValue - public String getAttribute(String attribute, String defaultValue)
attribute - defaultValue - public Double getAttribute(String attribute, Double defaultValue)
attribute - defaultValue - public Long getAttribute(String attribute, Long defaultValue)
attribute - defaultValue - public Float getAttribute(String attribute, Float defaultValue)
attribute - defaultValue - public Boolean getAttribute(String attribute, Boolean defaultValue)
attribute - defaultValue - public XmlNode setAttribute(String key, String value)
key - value - public int getNodeCount()
public XmlNode addNodes(Collection<XmlNode> list)
list - public List<XmlNode> getNodesByTagName(String name)
name - public List<XmlNode> getNodesByAttributeValue(String attribute, String value)
attribute - value - public List<XmlNode> getNodesByAttributeKey(String attribute, String value)
attribute - value - public List<XmlNode> getNodesByAttributeContainValue(String attribute, String value)
attribute - value - public List<XmlNode> getNodesByAttributeMatchValue(String attribute, String value)
attribute - value - public XmlNode getNodeByAttributeValue(String attribute, String value)
attribute - value - public XmlNode getNodeByAttributeKey(String attribute, String value)
attribute - value - public XmlNode getNodeByAttributeContainValue(String attribute, String value)
attribute - value - public XmlNode getNodeByAttributeMatchValue(String attribute, String value)
attribute - value - public byte[] getBytes()
throws IOException
IOExceptionpublic void write(OutputStream output) throws IOException
output - IOExceptionpublic int compareTo(XmlNode o)
compareTo in interface Comparable<XmlNode>Copyright © 2019 Tecgraf/PUC-Rio. All rights reserved.