public class DomXmpParser extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DomXmpParser.NamespaceFinder |
| Constructor and Description |
|---|
DomXmpParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isStrictParsing()
Tell if strict parsing mode is enabled.
|
XMPMetadata |
parse(byte[] xmp) |
XMPMetadata |
parse(InputStream input) |
void |
setStrictParsing(boolean strictParsing)
Enable or disable strict parsing mode.
|
public DomXmpParser()
throws XmpParsingException
XmpParsingExceptionpublic boolean isStrictParsing()
public void setStrictParsing(boolean strictParsing)
strictParsing - Whether to be strict or lenient when parsing XMP. True (the default)
means that malformed XMP will result in an exception, false (lenient) means that if malformed
content is encountered, the parser will continue its work if possible. Use strict mode if you
want to work with PDF/A files. Use lenient mode if you care more about getting metadata.public XMPMetadata parse(byte[] xmp) throws XmpParsingException
XmpParsingExceptionpublic XMPMetadata parse(InputStream input) throws XmpParsingException
XmpParsingExceptionCopyright © 2002–2026 The Apache Software Foundation. All rights reserved.