com.dyuproject.util.xml
Class SimpleNode
java.lang.Object
com.dyuproject.util.xml.SimpleNode
- All Implemented Interfaces:
- Node
public class SimpleNode
- extends Object
- implements Node
Simple XML to POJO bean
- Author:
- David Yu
SimpleNode
public SimpleNode(String name)
SimpleNode
public SimpleNode(String name,
String namespace)
SimpleNode
public SimpleNode(String name,
Node parent)
SimpleNode
public SimpleNode(String name,
Node parent,
String namespace)
setDefaultBufferSize
public static void setDefaultBufferSize(int size)
setParent
public void setParent(Node parent)
- Specified by:
setParent
in interface Node
getParent
public Node getParent()
- Specified by:
getParent
in interface Node
isRoot
public boolean isRoot()
- Specified by:
isRoot
in interface Node
size
public int size()
- Specified by:
size
in interface Node
hasAttribute
public boolean hasAttribute(String name)
- Specified by:
hasAttribute
in interface Node
setAttribute
public void setAttribute(String name,
String value)
- Specified by:
setAttribute
in interface Node
getAttribute
public String getAttribute(String name)
- Specified by:
getAttribute
in interface Node
setName
public void setName(String name)
- Specified by:
setName
in interface Node
getName
public String getName()
- Specified by:
getName
in interface Node
setNamespace
public void setNamespace(String namespace)
- Specified by:
setNamespace
in interface Node
getNamespace
public String getNamespace()
- Specified by:
getNamespace
in interface Node
getNodes
public List<Node> getNodes()
- Specified by:
getNodes
in interface Node
getNodes
public List<Node> getNodes(String name)
- Specified by:
getNodes
in interface Node
addNode
public void addNode(Node node)
- Specified by:
addNode
in interface Node
getNode
public Node getNode(int index)
- Specified by:
getNode
in interface Node
getLastNode
public Node getLastNode()
- Specified by:
getLastNode
in interface Node
getFirstNode
public Node getFirstNode()
- Specified by:
getFirstNode
in interface Node
addText
public void addText(char[] buf,
int start,
int length)
- Specified by:
addText
in interface Node
addText
public void addText(String text)
- Specified by:
addText
in interface Node
addText
public void addText(StringBuilder text)
- Specified by:
addText
in interface Node
addText
public void addText(StringBuffer text)
- Specified by:
addText
in interface Node
getText
public StringBuilder getText()
- Specified by:
getText
in interface Node
toString
public String toString()
- Overrides:
toString
in class Object
getNode
public Node getNode(String name)
- Specified by:
getNode
in interface Node
getNode
public Node getNode(String name,
int startingIndex)
- Specified by:
getNode
in interface Node
getNodeFromLast
public Node getNodeFromLast(String name)
- Specified by:
getNodeFromLast
in interface Node
getNodeFromLast
public Node getNodeFromLast(String name,
int startingIndex)
- Specified by:
getNodeFromLast
in interface Node
indexOf
public int indexOf(String name)
- Specified by:
indexOf
in interface Node
indexOf
public int indexOf(String name,
int startingIndex)
- Specified by:
indexOf
in interface Node
lastIndexOf
public int lastIndexOf(String name)
- Specified by:
lastIndexOf
in interface Node
lastIndexOf
public int lastIndexOf(String name,
int startingIndex)
- Specified by:
lastIndexOf
in interface Node
removeAttribute
public String removeAttribute(String name)
- Specified by:
removeAttribute
in interface Node
removeNode
public Node removeNode(int index)
- Specified by:
removeNode
in interface Node
removeNode
public boolean removeNode(Node node)
- Specified by:
removeNode
in interface Node
Copyright © 2013. All Rights Reserved.