org.dom4j
Interface ProcessingInstruction

All Superinterfaces:
java.lang.Cloneable, Node
All Known Implementing Classes:
AbstractProcessingInstruction

public interface ProcessingInstruction
extends Node

ProcessingInstruction defines an XML processing instruction. The Node.getName() method will return the target of the PI and the Node.getText() method will return the data from all of the instructions.

Version:
$Revision: 1.8 $
Author:
James Strachan

Field Summary
 
Fields inherited from interface org.dom4j.Node
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE
 
Method Summary
 java.lang.String getTarget()
          This method is the equivalent to the Node.getName() method.
 java.lang.String getText()
          Returns the text of this node.
 java.lang.String getValue(java.lang.String name)
          Returns the value of a specific name in the PI.
 java.util.Map getValues()
           
 boolean removeValue(java.lang.String name)
           
 void setTarget(java.lang.String target)
          This method is the equivalent to the Node.setName(java.lang.String) method.
 void setValue(java.lang.String name, java.lang.String value)
           
 void setValues(java.util.Map data)
           
 
Methods inherited from interface org.dom4j.Node
accept, asXML, asXPathResult, clone, createXPath, detach, getDocument, getName, getNodeType, getNodeTypeName, getParent, getPath, getPath, getStringValue, getUniquePath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setName, setParent, setText, supportsParent, valueOf, write
 

Method Detail

getTarget

public java.lang.String getTarget()
This method is the equivalent to the Node.getName() method. It is added for clarity.

Returns:
the target of this PI

setTarget

public void setTarget(java.lang.String target)
This method is the equivalent to the Node.setName(java.lang.String) method. It is added for clarity.


getText

public java.lang.String getText()
Description copied from interface: Node

Returns the text of this node.

Specified by:
getText in interface Node
Returns:
the text for all the data associated with the processing instruction

getValue

public java.lang.String getValue(java.lang.String name)

Returns the value of a specific name in the PI.

Parameters:
name - is the name of the attribute to lookup.
Returns:
the value of the named attribute

getValues

public java.util.Map getValues()
Returns:
the values for this processing instruction as a Map

setValue

public void setValue(java.lang.String name,
                     java.lang.String value)

setValues

public void setValues(java.util.Map data)

removeValue

public boolean removeValue(java.lang.String name)


Copyright © 2004 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge Logo