com.lowagie.text.xml.xmp

Class XmpReader

public class XmpReader extends Object

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
DocumentdomDocument
Constructor Summary
XmpReader(byte[] bytes)
Constructs an XMP reader
Method Summary
voidreplace(String namespaceURI, String localName, String value)
Replaces the content of a tag.
byte[]serializeDoc()
Writes the document to a byte array.
booleansetNodeText(Document domDocument, Node n, String value)
Sets the text of this node.

Field Detail

domDocument

private Document domDocument

Constructor Detail

XmpReader

public XmpReader(byte[] bytes)
Constructs an XMP reader

Parameters: bytes the XMP content

Method Detail

replace

public void replace(String namespaceURI, String localName, String value)
Replaces the content of a tag.

Parameters: namespaceURI the URI of the namespace localName the tag name value the new content for the tag

serializeDoc

public byte[] serializeDoc()
Writes the document to a byte array.

setNodeText

public boolean setNodeText(Document domDocument, Node n, String value)
Sets the text of this node. All the child's node are deleted and a new child text node is created.

Parameters: domDocument the Document that contains the node n the Node to add the text to value the text to add