Class ContentImporterHelper

java.lang.Object
org.ametys.plugins.contentio.ContentImporterHelper

public final class ContentImporterHelper extends Object
Helper to import contents.
  • Method Details

    • textToDocbook

      public static String textToDocbook(String[] lines)
      Transform text to docbook syntaxe
      Parameters:
      lines - The paragraphs to transform
      Returns:
      the docbook text
    • serializeNode

      public static String serializeNode(Node node) throws TransformerException
      Serialize a XML node as a String, with XML declaration and without indentation.
      Parameters:
      node - the node.
      Returns:
      the XML string.
      Throws:
      TransformerException - if an error occurs.
    • serializeNode

      public static String serializeNode(Node node, boolean indent) throws TransformerException
      Serialize a XML node as a String, with XML declaration.
      Parameters:
      node - the node.
      indent - true to indent the result, false otherwise.
      Returns:
      the XML string.
      Throws:
      TransformerException - if an error occurs.
    • serializeNode

      public static String serializeNode(Node node, boolean indent, boolean omitXmlDeclaration) throws TransformerException
      Serialize a XML node as a String.
      Parameters:
      node - the node.
      indent - true to indent the result, false otherwise.
      omitXmlDeclaration - true to omit XML declaration, false otherwise.
      Returns:
      the XML string.
      Throws:
      TransformerException - if an error occurs.