blob: 0b517746bc810d230f64480d755038c2e3bc0c8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package org.zwobble.mammoth.docx;
import org.zwobble.mammoth.documents.Document;
import org.zwobble.mammoth.xml.XmlElement;
public class DocumentXmlReader {
private final BodyXmlReader bodyReader;
public DocumentXmlReader(BodyXmlReader bodyReader) {
this.bodyReader = bodyReader;
}
public Document readElement(XmlElement element) {
XmlElement body = element.findChild("w:body");
return new Document(bodyReader.readElements(body.children()));
}
}
|