Package org.docx4j

Class TextUtils

java.lang.Object
org.docx4j.TextUtils

public class TextUtils extends Object
  • Constructor Details

    • TextUtils

      public TextUtils()
  • Method Details

    • getText

      public static String getText(Object o)
      Extract contents of descendant <w:t> elements.
      Parameters:
      o -
      Returns:
      String
      Since:
      6.0.0
    • extractText

      public static void extractText(Object o, Writer w) throws Exception
      Extract contents of descendant <w:t> elements.
      Parameters:
      o -
      jcSVG - JAXBContext
      Throws:
      Exception
    • extractText

      public static void extractText(Object o, Writer w, jakarta.xml.bind.JAXBContext jc) throws Exception
      Extract contents of descendant <w:t> elements.
      Parameters:
      o -
      jc - JAXBContext
      Throws:
      Exception
    • extractText

      public static void extractText(Object o, Writer w, jakarta.xml.bind.JAXBContext jc, String uri, String local, Class declaredType) throws Exception
      Extract contents of descendant <w:t> elements. Use this for objects which don't have @XmlRootElement
      Parameters:
      o -
      w -
      jc -
      uri -
      local -
      declaredType -
      Throws:
      Exception
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception