Package com.lowagie.text.xml.xmp
Class XmpReader
java.lang.Object
com.lowagie.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.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
- on errorIOException
- on errorSAXException
- on error
-
-
Method Details
-
replace
Replaces the content of a tag.- Parameters:
namespaceURI
- 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- Returns:
true
if added successfully, elsefalse
-
serializeDoc
Writes the document to a byte array.- Returns:
- byte array of serialized doc
- Throws:
IOException
- on error
-