Class XMLHelper

java.lang.Object
com.coveo.saml.XMLHelper

public class XMLHelper extends Object
  • Constructor Details

    • XMLHelper

      public XMLHelper()
  • Method Details

    • writeNode

      public static void writeNode(Node node, Writer output)
      Writes a Node out to a Writer using the DOM, level 3, Load/Save serializer. The written content is encoded using the encoding specified in the writer configuration.
      Parameters:
      node - the node to write out
      output - the writer to write the XML to
    • writeNode

      public static void writeNode(Node node, Writer output, Map<String,Object> serializerParams)
      Writes a Node out to a Writer using the DOM, level 3, Load/Save serializer. The written content is encoded using the encoding specified in the writer configuration.
      Parameters:
      node - the node to write out
      output - the writer to write the XML to
      serializerParams - parameters to pass to the DOMConfiguration of the serializer instance, obtained via LSSerializer.getDomConfig(). May be null.
    • getLSSerializer

      public static LSSerializer getLSSerializer(DOMImplementationLS domImplLS, Map<String,Object> serializerParams)
      Obtain a the DOM, level 3, Load/Save serializer LSSerializer instance from the given DOMImplementationLS instance.

      The serializer instance will be configured with the parameters passed as the serializerParams argument. It will also be configured with an LSSerializerFilter that shows all nodes to the filter, and accepts all nodes shown.

      Parameters:
      domImplLS - the DOM Level 3 Load/Save implementation to use
      serializerParams - parameters to pass to the DOMConfiguration of the serializer instance, obtained via LSSerializer.getDomConfig(). May be null.
      Returns:
      a new LSSerializer instance
    • getLSDOMImpl

      public static DOMImplementationLS getLSDOMImpl(Node node)
      Get the DOM Level 3 Load/Save DOMImplementationLS for the given node.
      Parameters:
      node - the node to evaluate
      Returns:
      the DOMImplementationLS for the given node
    • createDOMParser

      public static net.shibboleth.utilities.java.support.xml.BasicParserPool createDOMParser() throws SamlException
      Creates a DOM parser
      Returns:
      BasicParserPool
      Throws:
      SamlException