TIKA-3164 - add more .xsb and classes needed for TIKAs extractor

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888985 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2021-04-19 22:48:09 +00:00
parent cf045a86b0
commit 48d3c68270
3 changed files with 18 additions and 6 deletions

View File

@ -59,14 +59,26 @@ public final class POIXMLDocumentHandler {
protected static void cursorRecursive(XmlObject base) { protected static void cursorRecursive(XmlObject base) {
XmlCursor cur = base.newCursor(); XmlCursor cur = base.newCursor();
try { try {
if (!cur.toFirstChild()) { cursorRecursive(cur);
return;
}
do {
cursorRecursive(cur.getObject());
} while (cur.toNextSibling());
} finally { } finally {
cur.dispose(); cur.dispose();
} }
} }
private static void cursorRecursive(XmlCursor cur) {
do {
assertNotNull(cur.getObject());
cur.push();
for (boolean b = cur.toFirstAttribute(); b; b = cur.toNextAttribute()) {
assertNotNull(cur.getObject());
}
cur.pop();
cur.push();
if (cur.toFirstChild()) {
cursorRecursive(cur);
}
cur.pop();
} while (cur.toNextSibling());
}
} }

Binary file not shown.

Binary file not shown.