Package org.docx4j
Class TextUtils
java.lang.Object
org.docx4j.TextUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA SAX ContentHandler that writes all #PCDATA onto a java.io.Writer From http://www.cafeconleche.org/books/xmljava/chapters/ch06s03.html -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidextractText(Object o, Writer w) Extract contents of descendant <w:t> elements.static voidextractText(Object o, Writer w, jakarta.xml.bind.JAXBContext jc) Extract contents of descendant <w:t> elements.static voidextractText(Object o, Writer w, jakarta.xml.bind.JAXBContext jc, String uri, String local, Class declaredType) Extract contents of descendant <w:t> elements.static StringExtract contents of descendant <w:t> elements.static void
-
Constructor Details
-
TextUtils
public TextUtils()
-
-
Method Details
-
getText
Extract contents of descendant <w:t> elements.- Parameters:
o-- Returns:
- String
- Since:
- 6.0.0
-
extractText
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
- Throws:
Exception
-