org.apache.xmpbox.xml

## Class DomXmpParser

- java.lang.Object
- - org.apache.xmpbox.xml.DomXmpParser

    public class DomXmpParser
    extends Object

### Nested Class Summary

Nested Classes
`protected static class` `DomXmpParser.NamespaceFinder`

### Constructor Summary

Constructors
Constructor and Description
`DomXmpParser()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DomXmpParser

    public DomXmpParser()
                 throws XmpParsingException

Throws:
  `XmpParsingException`

### Method Detail

#### isStrictParsing

    public boolean isStrictParsing()

Tell if strict parsing mode is enabled.

Returns:
  Whether strict parsing mode is enabled or not.

#### setStrictParsing

    public void setStrictParsing(boolean strictParsing)

Enable or disable strict parsing mode.

Parameters:
  `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.

#### parse

    public XMPMetadata parse(byte[] xmp)
                      throws XmpParsingException

Throws:
  `XmpParsingException`

#### parse

    public XMPMetadata parse(InputStream input)
                      throws XmpParsingException

Throws:
  `XmpParsingException`