fr.reseaumexico.model.writer
Class XmlNode
java.lang.Object
fr.reseaumexico.model.writer.XmlNode
public class XmlNode
- extends Object
Represent an XML node
- Since:
- 0.1
- Author:
- sletellier
|
Method Summary |
void |
add(XmlNode e)
|
void |
addAttribute(String name,
String value)
|
protected void |
addToBuilder(StringBuilder stringBuilder,
String template,
String prefix,
String tagName)
|
protected void |
buildXml(int start,
int indent,
StringBuilder stringBuilder)
|
static XmlNode |
createElement(String tagName,
String text)
|
static XmlNode |
createElement(XmlNode parentXmlNode,
String tagName)
|
static XmlNode |
createElement(XmlNode parentXmlNode,
String tagName,
String text)
|
protected String |
getAttributesAsString()
|
protected String |
getIndentPrefix(int start,
int lenght)
|
String |
toXml(int indent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_META
public static final String XML_META
- See Also:
- Constant Field Values
CLOSED_TAG
public static final String CLOSED_TAG
- See Also:
- Constant Field Values
START_TAG
public static final String START_TAG
- See Also:
- Constant Field Values
END_TAG
public static final String END_TAG
- See Also:
- Constant Field Values
children
protected List<XmlNode> children
attributes
protected Map<String,String> attributes
tagName
protected String tagName
text
protected String text
XmlNode
public XmlNode(String tagName)
XmlNode
public XmlNode(String tagName,
String text)
add
public void add(XmlNode e)
addAttribute
public void addAttribute(String name,
String value)
toXml
public String toXml(int indent)
buildXml
protected void buildXml(int start,
int indent,
StringBuilder stringBuilder)
addToBuilder
protected void addToBuilder(StringBuilder stringBuilder,
String template,
String prefix,
String tagName)
getIndentPrefix
protected String getIndentPrefix(int start,
int lenght)
getAttributesAsString
protected String getAttributesAsString()
createElement
public static XmlNode createElement(XmlNode parentXmlNode,
String tagName)
createElement
public static XmlNode createElement(XmlNode parentXmlNode,
String tagName,
String text)
createElement
public static XmlNode createElement(String tagName,
String text)
Copyright © 2011-2012 Code Lutin. All Rights Reserved.