Class XMLUtils

java.lang.Object
co.ecg.alpaca.commons.formatting.XMLUtils

public class XMLUtils extends Object
XML Utility Class for the Alpaca Library. These utilities are used in both the generation process and the toolkit.
  • Constructor Details

    • XMLUtils

      public XMLUtils()
  • Method Details

    • getDocumentBuilder

      public static DocumentBuilder getDocumentBuilder()
      Gets the Document Builder Factory
      Returns:
      The DocumentBuilder Object
    • getXMLTransformer

      public static Transformer getXMLTransformer()
      Gets the XML Transformer
      Returns:
      The XML Transformer Object
    • getXPath

      public static XPath getXPath()
      Gets the XPath for the library. The XPath is pre-filled with information regarding the OCI schema.
      Returns:
      The Alpaca XPath
    • transformDOMToXML

      public static String transformDOMToXML(Node node)
      Transformer operation to convert DOM node to an XML String
      Parameters:
      node - The Node to transform.
      Returns:
      Returns the XML string for the DOM node.
    • transformStringToXML

      public static String transformStringToXML(String string)
      Transformer operation to format a String of any style to an XML String. This requires the given string to be XML valid or it will fail.
      Parameters:
      string - The String to format.
      Returns:
      Returns the XML formatted String.
    • maskXMLStringForLog

      public static String maskXMLStringForLog(String string)