| java.lang.Object org.jdom.Content org.jdom.ProcessingInstruction
ProcessingInstruction | public class ProcessingInstruction extends Content (Code) | | An XML processing instruction. Methods allow the user to obtain the target of
the PI as well as its data. The data can always be accessed as a String or,
if the data appears akin to an attribute list, can be retrieved as name/value
pairs.
version: $Revision: 1.1 $, $Date: 2005/04/27 09:32:39 $ author: Brett McLaughlin author: Jason Hunter author: Steven Gould |
Method Summary | |
public Object | clone() This will return a clone of this ProcessingInstruction . | public String | getData() This will return the raw data from all instructions. | public List | getPseudoAttributeNames() This will return a List containing the names of the
"attribute" style pieces of name/value pairs in this PI's data. | public String | getPseudoAttributeValue(String name) This will return the value for a specific
name/value pair on the PI. | public String | getTarget() This will retrieve the target of the PI. | public String | getValue() Returns the XPath 1.0 string value of this element, which is the
data of this PI. | public boolean | removePseudoAttribute(String name) This will remove the pseudo attribute with the specified name. | public ProcessingInstruction | setData(String data) This will set the raw data for the PI.
Parameters: data - String data of PI. | public ProcessingInstruction | setData(Map data) This will set the name/value pairs within the passed
Map as the pairs for the data of
this PI. | public ProcessingInstruction | setPseudoAttribute(String name, String value) This will set a pseudo attribute with the given name and value.
If the PI data is not already in a pseudo-attribute format, this will
replace the existing data.
Parameters: name - String name of pair. Parameters: value - String value for pair. | public ProcessingInstruction | setTarget(String newTarget) This will set the target for the PI.
Parameters: newTarget - String new target of PI. | public String | toString() This returns a String representation of the
ProcessingInstruction , suitable for debugging. |
mapData | protected Map mapData(Code) | | The data for the PI in name/value pairs
|
rawData | protected String rawData(Code) | | The data for the PI as a String
|
ProcessingInstruction | protected ProcessingInstruction()(Code) | | Default, no-args constructor for implementations
to use if needed.
|
ProcessingInstruction | public ProcessingInstruction(String target, Map data)(Code) | | This will create a new ProcessingInstruction
with the specified target and data.
Parameters: target - String target of PI. Parameters: data - Map data for PI, inname/value pairs throws: IllegalTargetException - if the given target is illegalas a processing instruction name. |
ProcessingInstruction | public ProcessingInstruction(String target, String data)(Code) | | This will create a new ProcessingInstruction
with the specified target and data.
Parameters: target - String target of PI. Parameters: data - String data for PI. throws: IllegalTargetException - if the given target is illegalas a processing instruction name. |
clone | public Object clone()(Code) | | This will return a clone of this ProcessingInstruction .
Object - clone of thisProcessingInstruction . |
getData | public String getData()(Code) | | This will return the raw data from all instructions.
String - data of PI. |
getPseudoAttributeNames | public List getPseudoAttributeNames()(Code) | | This will return a List containing the names of the
"attribute" style pieces of name/value pairs in this PI's data.
List - the List containing the"attribute" names. |
getPseudoAttributeValue | public String getPseudoAttributeValue(String name)(Code) | | This will return the value for a specific
name/value pair on the PI. If no such pair is
found for this PI, null is returned.
Parameters: name - String name of name/value pairto lookup value for. String - value of name/value pair. |
getTarget | public String getTarget()(Code) | | This will retrieve the target of the PI.
String - target of PI. |
getValue | public String getValue()(Code) | | Returns the XPath 1.0 string value of this element, which is the
data of this PI.
the data of this PI |
removePseudoAttribute | public boolean removePseudoAttribute(String name)(Code) | | This will remove the pseudo attribute with the specified name.
Parameters: name - name of pseudo attribute to remove boolean - whether the requestedinstruction was removed. |
setData | public ProcessingInstruction setData(String data)(Code) | | This will set the raw data for the PI.
Parameters: data - String data of PI. ProcessingInstruction - this PI modified. |
setData | public ProcessingInstruction setData(Map data)(Code) | | This will set the name/value pairs within the passed
Map as the pairs for the data of
this PI. The keys should be the pair name
and the values should be the pair values.
Parameters: data - new map data to use ProcessingInstruction - modified PI. |
setPseudoAttribute | public ProcessingInstruction setPseudoAttribute(String name, String value)(Code) | | This will set a pseudo attribute with the given name and value.
If the PI data is not already in a pseudo-attribute format, this will
replace the existing data.
Parameters: name - String name of pair. Parameters: value - String value for pair. ProcessingInstruction this PI modified. |
setTarget | public ProcessingInstruction setTarget(String newTarget)(Code) | | This will set the target for the PI.
Parameters: newTarget - String new target of PI. ProcessingInstruction - this PI modified. |
|
|