|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.maximo.util.XmlBuilder
public final class XmlBuilder
Simple XML content generator.
This class contains simple methods to create XML content.
Note: no XML validation is made.
Constructor Summary | |
---|---|
XmlBuilder(String rootName)
Constructs a new XmlBuilder . |
Method Summary | |
---|---|
void |
setAttribute(String fullName,
String value)
Defines an XML attribute and its value. |
void |
tag(String fullName,
String value)
Defines an XML tag and its content (without CDATA block). |
void |
tag(String fullName,
String value,
boolean cdata)
Defines an XML tag and its content. |
String |
toString()
Returns the XML content as String . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XmlBuilder(String rootName)
XmlBuilder
.
rootName
- name of the root nodeMethod Detail |
---|
public void setAttribute(String fullName, String value)
The fullName
parameter must comply the following syntax:
<code> <root node>@<child node 1>@<child node 2>@<child node N>#<new attribute> </code>
fullName
- the complete path from the root node until the attribute namevalue
- the attribute's valuepublic void tag(String fullName, String value)
fullName
- the complete path from the root node until the tag namevalue
- the tag's contenttag(String, String, boolean)
public void tag(String fullName, String value, boolean cdata)
The fullName
parameter must comply the following syntax:
<code> <root node>@<child node 1>@<child node 2>@<child node N>@<new tag> </code>
fullName
- the complete path from the root node until the tag namevalue
- the tag's contentcdata
- true
if value
must be enclosed by a
CDATA block, otherwise false
public String toString()
String
.
toString
in class Object
String
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |