Class XmpReader

java.lang.Object
com.aowagie.text.xml.xmp.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
  • Constructor Details

  • Method Details

    • replace

      public boolean replace(String parent, String namespaceURI, String localName, String value)
      Replaces the content of a tag.
      Parameters:
      parent - the tag name of the parent
      namespaceURI - the URI of the namespace
      localName - the tag name
      value - 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

      public boolean add(String parent, String namespaceURI, String localName, String value)
      Adds a tag.
      Parameters:
      parent - the tag name of the parent
      namespaceURI - the URI of the namespace
      localName - the name of the tag to add
      value - the new content for the tag
      Returns:
      true if the content was successfully added
      Since:
      2.1.6
    • serializeDoc

      public byte[] serializeDoc() throws IOException
      Writes the document to a byte array.
      Returns:
      return a serialize document
      Throws:
      IOException - with a I/O error