Package org.docx4j.model.datastorage
Class BindingTraverserStAX
java.lang.Object
org.docx4j.model.datastorage.BindingTraverserCommonImpl
org.docx4j.model.datastorage.BindingTraverserStAX
- All Implemented Interfaces:
BindingTraverserInterface
Use StAX to bind content controls, bypassing the need
to unmarshal the entire MDP.
TODO add HTML import, FlatOPC support
- Author:
- jharrop
-
Field Summary
FieldsFields inherited from class org.docx4j.model.datastorage.BindingTraverserCommonImpl
bookmarkId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstreamToBind(JaxbXmlPart part, OpcPackage pkg, Map<String, Xpaths.Xpath> xpathsMap) Bind the content controls; avoid unmarshalling the entire part.traverseToBind(JaxbXmlPart part, OpcPackage pkg, Map<String, Xpaths.Xpath> xpathsMap) Traverse (typically a clone of) the part, binding content controls.Methods inherited from class org.docx4j.model.datastorage.BindingTraverserCommonImpl
getNextBookmarkId, setStartingIdForNewBookmarks
-
Field Details
-
context
public static jakarta.xml.bind.JAXBContext context
-
-
Constructor Details
-
BindingTraverserStAX
public BindingTraverserStAX()
-
-
Method Details
-
traverseToBind
public Object traverseToBind(JaxbXmlPart part, OpcPackage pkg, Map<String, Xpaths.Xpath> xpathsMap) throws Docx4JExceptionDescription copied from interface:BindingTraverserInterfaceTraverse (typically a clone of) the part, binding content controls. Returns JAXB content tree.- Specified by:
traverseToBindin interfaceBindingTraverserInterface- Specified by:
traverseToBindin classBindingTraverserCommonImpl- Throws:
Docx4JException
-
streamToBind
public void streamToBind(JaxbXmlPart part, OpcPackage pkg, Map<String, Xpaths.Xpath> xpathsMap) throws Docx4JExceptionBind the content controls; avoid unmarshalling the entire part.- Parameters:
part-pkg-xpathsMap-- Throws:
Docx4JException
-