public class XMLBuilderUtils
extends java.lang.Object
Constructor and Description |
---|
XMLBuilderUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addAttribute(java.lang.StringBuffer buffer_,
java.lang.String attr_,
java.lang.String value_,
boolean escape_)
Adds an XML attribute to a buffer
|
static void |
addCData(java.lang.StringBuffer buffer_,
java.lang.String value_)
Encloses an item in CDATA tags
|
static void |
addSimpleElement(java.lang.StringBuffer buffer_,
java.lang.String element_,
java.lang.String body_,
boolean cData_)
Adds a simple XML element to a buffer
|
static void |
appendAsHtmlString(java.lang.StringBuffer buffer_,
char[] text_)
Appends the plain text as an HTML string, escaping reserved characters and
replacing \n with
along the way |
static void |
appendAsHtmlString(java.lang.StringBuffer buffer_,
java.lang.String text_)
Appends the plain text as an HTML string, escaping reserved characters and
replacing \n with
along the way |
static void |
appendAsHtmlString(java.lang.StringBuffer buffer_,
java.lang.StringBuffer text_)
Appends the plain text as an HTML string, escaping reserved characters and
replacing \n with
along the way |
public static void addCData(java.lang.StringBuffer buffer_, java.lang.String value_)
buffer_
- buffer to add tovalue_
- value to enclose in CDATA tagspublic static void addSimpleElement(java.lang.StringBuffer buffer_, java.lang.String element_, java.lang.String body_, boolean cData_)
buffer_
- buffer to add xml element toelement_
- element to addbody_
- body of elementcData_
- whether or not the element is CDATA. If it is, then it will
be enclosed in CDATA tags using addCData(java.lang.StringBuffer, java.lang.String)
public static void addAttribute(java.lang.StringBuffer buffer_, java.lang.String attr_, java.lang.String value_, boolean escape_)
buffer_
- buffer to add xml element toattr_
- the attribute namevalue_
- attribute valueescape_
- whether or not the element should be escaped to HTML
(follows the same rules as appendAsHtmlString)public static void appendAsHtmlString(java.lang.StringBuffer buffer_, char[] text_)
buffer_
- buffer to append the HTML data totext_
- plain text version of the text to addpublic static void appendAsHtmlString(java.lang.StringBuffer buffer_, java.lang.String text_)
buffer_
- buffer to append the HTML data totext_
- plain text version of the text to addappendAsHtmlString(StringBuffer, char[])
public static void appendAsHtmlString(java.lang.StringBuffer buffer_, java.lang.StringBuffer text_)
buffer_
- buffer to append the HTML data totext_
- plain text version of the text to addappendAsHtmlString(StringBuffer, char[])
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.