public class XmpReader extends Object
Constructor and Description |
---|
XmpReader(byte[] bytes)
Constructs an XMP reader
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(String parent,
String namespaceURI,
String localName,
String value)
Adds a tag.
|
boolean |
replace(String namespaceURI,
String localName,
String value)
Replaces the content of a tag.
|
byte[] |
serializeDoc()
Writes the document to a byte array.
|
boolean |
setNodeText(Document domDocument,
Node n,
String value)
Sets the text of this node.
|
public XmpReader(byte[] bytes) throws SAXException, IOException
bytes
- the XMP contentExceptionConverter
- on errorIOException
- on errorSAXException
- on errorpublic boolean replace(String namespaceURI, String localName, String value)
namespaceURI
- the URI of the namespacelocalName
- the tag namevalue
- the new content for the tagpublic boolean add(String parent, String namespaceURI, String localName, 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(Document domDocument, Node n, String value)
domDocument
- the Document
that contains the noden
- the Node
to add the text tovalue
- the text to addtrue
if added successfully, else false
public byte[] serializeDoc() throws IOException
IOException
- on errorCopyright © 2020. All rights reserved.