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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a tag.booleanReplaces the content of a tag.byte[]Writes the document to a byte array.booleansetNodeText(Document domDocument, Node n, String value) Sets the text of this node.
-
Constructor Details
-
XmpReader
Constructs an XMP reader- Parameters:
bytes- the XMP content- Throws:
ExceptionConverterIOExceptionSAXException
-
-
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:
namespaceURI- the URI of the namespaceparent- the tag name of the parentlocalName- 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- theDocumentthat contains the noden- theNodeto add the text tovalue- the text to add
-
serializeDoc
Writes the document to a byte array.- Throws:
IOException
-