ca.uottawa.balie
Class XmlUtil

java.lang.Object
  extended by ca.uottawa.balie.XmlUtil

public class XmlUtil
extends java.lang.Object

Utility class for reading and writing XML files

Author:
nadeaud

Method Summary
static java.lang.String Decode(java.lang.String pi_text)
          Decode specials chars for XML representation
static java.lang.String Encode(java.lang.String pi_text)
          Encode specials chars for XML representation
static java.lang.String Header()
          Gets an XML header.
static java.lang.String Header(java.lang.String pi_encoding)
          Gets an XML header with an Encoding attribute.
static java.lang.String StyleSheet(java.lang.String pi_Filename)
          Gets the XML line that declares the stylesheet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Header

public static java.lang.String Header()
Gets an XML header.

Returns:
String

Header

public static java.lang.String Header(java.lang.String pi_encoding)
Gets an XML header with an Encoding attribute.

Parameters:
pi_encoding - The file encoding
Returns:
String

StyleSheet

public static java.lang.String StyleSheet(java.lang.String pi_Filename)
Gets the XML line that declares the stylesheet.

Parameters:
pi_Filename - Location of the stylesheet
Returns:
String

Encode

public static java.lang.String Encode(java.lang.String pi_text)
Encode specials chars for XML representation

Parameters:
pi_text - The raw text
Returns:
The encoded text

Decode

public static java.lang.String Decode(java.lang.String pi_text)
Decode specials chars for XML representation

Parameters:
pi_text - The encoded text
Returns:
The decoded text