Package org.jdom2.located
Class LocatedProcessingInstruction
- java.lang.Object
-
- org.jdom2.Content
-
- org.jdom2.ProcessingInstruction
-
- org.jdom2.located.LocatedProcessingInstruction
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Located,NamespaceAware
public class LocatedProcessingInstruction extends ProcessingInstruction implements Located
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.- Author:
- Rolf Lear
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jdom2.Content
Content.CType
-
-
Constructor Summary
Constructors Constructor Description LocatedProcessingInstruction(java.lang.String target)This will create a newProcessingInstructionwith the specified target.LocatedProcessingInstruction(java.lang.String target, java.lang.String data)This will create a newProcessingInstructionwith the specified target and data.LocatedProcessingInstruction(java.lang.String target, java.util.Map<java.lang.String,java.lang.String> data)This will create a newProcessingInstructionwith the specified target and data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumn()Get the column (character on the line).intgetLine()Get the line numbervoidsetColumn(int col)Set the column (character on the line).voidsetLine(int line)Set the line number-
Methods inherited from class org.jdom2.ProcessingInstruction
clone, detach, getData, getPseudoAttributeNames, getPseudoAttributeValue, getTarget, getValue, removePseudoAttribute, setData, setData, setParent, setPseudoAttribute, setTarget, toString
-
Methods inherited from class org.jdom2.Content
equals, getCType, getDocument, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParent, getParentElement, hashCode
-
-
-
-
Constructor Detail
-
LocatedProcessingInstruction
public LocatedProcessingInstruction(java.lang.String target)
This will create a newProcessingInstructionwith the specified target.- Parameters:
target-Stringtarget of PI.- Throws:
IllegalTargetException- if the given target is illegal as a processing instruction name.
-
LocatedProcessingInstruction
public LocatedProcessingInstruction(java.lang.String target, java.util.Map<java.lang.String,java.lang.String> data)This will create a newProcessingInstructionwith the specified target and data.- Parameters:
target-Stringtarget of PI.data-Mapdata for PI, in name/value pairs- Throws:
IllegalTargetException- if the given target is illegal as a processing instruction name.
-
LocatedProcessingInstruction
public LocatedProcessingInstruction(java.lang.String target, java.lang.String data)This will create a newProcessingInstructionwith the specified target and data.- Parameters:
target-Stringtarget of PI.data-Stringdata for PI.- Throws:
IllegalTargetException- if the given target is illegal as a processing instruction name.
-
-
Method Detail
-
getLine
public int getLine()
Description copied from interface:LocatedGet the line number
-
getColumn
public int getColumn()
Description copied from interface:LocatedGet the column (character on the line).
-
setLine
public void setLine(int line)
Description copied from interface:LocatedSet the line number
-
-