Package com.aowagie.text.xml.xmp
Class XmpReader
java.lang.Object
com.aowagie.text.xml.xmp.XmpReader
Reads an XMP stream into an org.w3c.dom.Document objects.
Allows you to replace the contents of a specific tag.
- Since:
- 2.1.3
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a tag.boolean
Replaces the content of a tag.byte[]
Writes the document to a byte array.private boolean
setNodeText
(Document domDocument, Node n, String value) Sets the text of this node.
-
Field Details
-
domDocument
-
-
Constructor Details
-
XmpReader
Constructs an XMP reader- Parameters:
bytes
- the XMP content- Throws:
ExceptionConverter
- Exception with a converter errorIOException
- Exception with a IO errorSAXException
- Exception with a SAX error
-
-
Method Details
-
replace
Replaces the content of a tag.- Parameters:
parent
- the tag name of the parentnamespaceURI
- the URI of the namespacelocalName
- the tag namevalue
- the new content for the tag- Returns:
- true if the content was successfully replaced
- Since:
- 2.1.6 the return type has changed from void to boolean
-
add
Adds a tag.- Parameters:
parent
- the tag name of the parentnamespaceURI
- the URI of the namespacelocalName
- the name of the tag to addvalue
- the new content for the tag- Returns:
- true if the content was successfully added
- Since:
- 2.1.6
-
setNodeText
Sets the text of this node. All the child's node are deleted and a new child text node is created.- Parameters:
domDocument
- theDocument
that contains the noden
- theNode
to add the text tovalue
- the text to add
-
serializeDoc
Writes the document to a byte array.- Returns:
- return a serialize document
- Throws:
IOException
- with a I/O error
-