public class XmpReader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private org.w3c.dom.Document |
domDocument |
Constructor and Description |
---|
XmpReader(byte[] bytes)
Constructs an XMP reader
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.String parent,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
Adds a tag.
|
boolean |
replace(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
Replaces the content of a tag.
|
byte[] |
serializeDoc()
Writes the document to a byte array.
|
boolean |
setNodeText(org.w3c.dom.Document domDocument,
org.w3c.dom.Node n,
java.lang.String value)
Sets the text of this node.
|
public XmpReader(byte[] bytes) throws org.xml.sax.SAXException, java.io.IOException
bytes
- the XMP contentExceptionConverter
java.io.IOException
org.xml.sax.SAXException
public boolean replace(java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
namespaceURI
- the URI of the namespacelocalName
- the tag namevalue
- the new content for the tagpublic boolean add(java.lang.String parent, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
namespaceURI
- the URI of the namespaceparent
- the tag name of the parentlocalName
- the name of the tag to addvalue
- the new content for the tagpublic boolean setNodeText(org.w3c.dom.Document domDocument, org.w3c.dom.Node n, java.lang.String value)
domDocument
- the Document
that contains the noden
- the Node
to add the text tovalue
- the text to addpublic byte[] serializeDoc() throws java.io.IOException
java.io.IOException