Package com.itextpdf.text.xml.xmp
Class XmpReader
- java.lang.Object
-
- com.itextpdf.text.xml.xmp.XmpReader
-
@Deprecated public class XmpReader extends Object
Deprecated.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 Modifier and Type Field Description static StringEXTRASPACEDeprecated.String used to fill the extra space.static StringXPACKET_PI_BEGINDeprecated.Processing Instruction required at the start of an XMP streamstatic StringXPACKET_PI_END_WDeprecated.Processing Instruction required at the end of an XMP stream for XMP streams that can be updated
-
Constructor Summary
Constructors Constructor Description XmpReader(byte[] bytes)Deprecated.Constructs an XMP reader
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanadd(String parent, String namespaceURI, String localName, String value)Deprecated.Adds a tag.booleanreplaceDescriptionAttribute(String namespaceURI, String localName, String value)Deprecated.Replaces the content of an attribute in the description tag.booleanreplaceNode(String namespaceURI, String localName, String value)Deprecated.Replaces the content of a tag.byte[]serializeDoc()Deprecated.Writes the document to a byte array.booleansetNodeText(Document domDocument, Node n, String value)Deprecated.Sets the text of this node.
-
-
-
Field Detail
-
EXTRASPACE
public static final String EXTRASPACE
Deprecated.String used to fill the extra space.- See Also:
- Constant Field Values
-
XPACKET_PI_BEGIN
public static final String XPACKET_PI_BEGIN
Deprecated.Processing Instruction required at the start of an XMP stream- See Also:
- Constant Field Values
-
XPACKET_PI_END_W
public static final String XPACKET_PI_END_W
Deprecated.Processing Instruction required at the end of an XMP stream for XMP streams that can be updated- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XmpReader
public XmpReader(byte[] bytes) throws SAXException, IOExceptionDeprecated.Constructs an XMP reader- Parameters:
bytes- the XMP content- Throws:
ExceptionConverterIOExceptionSAXException
-
-
Method Detail
-
replaceNode
public boolean replaceNode(String namespaceURI, String localName, String value)
Deprecated.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
-
replaceDescriptionAttribute
public boolean replaceDescriptionAttribute(String namespaceURI, String localName, String value)
Deprecated.Replaces the content of an attribute in the description 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:
- 5.0.0 the return type has changed from void to boolean
-
add
public boolean add(String parent, String namespaceURI, String localName, String value)
Deprecated.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
public boolean setNodeText(Document domDocument, Node n, String value)
Deprecated.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
public byte[] serializeDoc() throws IOExceptionDeprecated.Writes the document to a byte array.- Throws:
IOException
-
-