Package fr.paris.lutece.util.xml
Class XmlUtil
java.lang.Object
fr.paris.lutece.util.xml.XmlUtil
This class provides utils for XML document management.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddElement(StringBuffer strXmlBuffer, String strTag, int nValue) Add an element to an XML document buffer.static voidaddElement(StringBuffer strXmlBuffer, String strTag, String strValue) Add an element to an XML document bufferstatic voidaddElement(StringBuffer strXmlBuffer, String strTag, String strValue, Map<?, ?> attrList) Add an element to an XML document buffer with attributesstatic voidaddElementHtml(StringBuffer strXmlBuffer, String strTag, String strValue) Add a CDATA type element to XML document buffer.static voidaddElementHtml(StringBuffer strXmlBuffer, String strTag, String strValue, Map<?, ?> attrList) Add a CDATA type element to XML document buffer.static voidaddEmptyElement(StringBuffer strXmlBuffer, String strTag, Map<?, ?> attrList) Add an empty element (< />) to an XML document buffer.static voidbeginElement(StringBuffer strXmlBuffer, String strTag) Add an opening tag for an element in a XML document bufferstatic voidbeginElement(StringBuffer strXmlBuffer, String strTag, Map<?, ?> attrList) Add an opening tag for an element in a XML document bufferstatic voidendElement(StringBuffer strXmlBuffer, String strTag) Add a closing tag for an element in a XML document bufferstatic StringGets the header of an XML file
-
Field Details
-
PROPERTIES_XML_HEADER
- See Also:
-
-
Method Details
-
getXmlHeader
Gets the header of an XML file- Returns:
- The header
-
addElement
Add an element to an XML document buffer- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to addstrValue- The value of the element
-
addEmptyElement
Add an empty element (< />) to an XML document buffer.- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to addattrList- The attributes list
-
addElement
public static void addElement(StringBuffer strXmlBuffer, String strTag, String strValue, Map<?, ?> attrList) Add an element to an XML document buffer with attributes- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to addstrValue- The value of the elementattrList- the attribute list
-
addElement
Add an element to an XML document buffer.- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to addnValue- The value of the element
-
addElementHtml
Add a CDATA type element to XML document buffer.- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to addstrValue- The value of the element
-
addElementHtml
public static void addElementHtml(StringBuffer strXmlBuffer, String strTag, String strValue, Map<?, ?> attrList) Add a CDATA type element to XML document buffer.- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to addstrValue- The value of the elementattrList- The attributes list
-
beginElement
Add an opening tag for an element in a XML document buffer- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to add
-
beginElement
Add an opening tag for an element in a XML document buffer- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to addattrList- The attributes list
-
endElement
Add a closing tag for an element in a XML document buffer- Parameters:
strXmlBuffer- The XML document bufferstrTag- The tag name of the element to add
-