cxxtools::xml::ProcessingInstruction Class Reference

A ProcessingInstruction (PI) element (Node) of an XML document. More...

#include <cxxtools/xml/processinginstruction.h>

Inheritance diagram for cxxtools::xml::ProcessingInstruction:
cxxtools::xml::Node

Public Member Functions

 ProcessingInstruction ()
 Constructs a new ProcessingInstruction.
void clear ()
ProcessingInstructionclone () const
 Clones this CData object by creating a duplicate on the heap and returning it.
const Stringtarget () const
 Returns the processor instruction's target.
Stringtarget ()
void setTarget (const String &target)
 Sets the processor instruction's target.
const Stringdata () const
 Returns the processor instruction's data.
Stringdata ()
void setData (const String &data)
 Sets the processor instruction's data.
- Public Member Functions inherited from cxxtools::xml::Node
 Node (Type type)
 Constructs a new Node object with the specified node type.
virtual ~Node ()
 Empty destructor.
Type type () const
 Returns the type of this Node that can be used to determine what specific Node this object is.
virtual bool operator== (const Node &node) const
 Compares this Node object with the given node.

Additional Inherited Members

- Public Types inherited from cxxtools::xml::Node
enum  Type {
  Unknown = 0, StartDocument = 1, DocType = 2, EndDocument = 3,
  StartElement = 4, EndElement = 5, Characters = 6, Comment,
  ProcessingInstruction
}

Detailed Description

A ProcessingInstruction (PI) element (Node) of an XML document.

A processing instruction can be used to add instructions to an XML document which is needed and can be used by specific XML processing software. The data of a processing instruction has no particular format and can contain plain Text or XML-like attribute/value-associations.

To access the target, which may for example be a identifier for a specific XML processor, the method target() can be used. To access the data for this processor the method data() can be used.

See Also
Node

Constructor & Destructor Documentation

cxxtools::xml::ProcessingInstruction::ProcessingInstruction ( )
inline

Constructs a new ProcessingInstruction.

Member Function Documentation

void cxxtools::xml::ProcessingInstruction::clear ( )
inline
ProcessingInstruction* cxxtools::xml::ProcessingInstruction::clone ( ) const
inlinevirtual

Clones this CData object by creating a duplicate on the heap and returning it.

Returns
A cloned version of this CData object.

Implements cxxtools::xml::Node.

const String& cxxtools::xml::ProcessingInstruction::data ( ) const
inline

Returns the processor instruction's data.

The precise nature of the PI data depends on the XML processor for which this PI was added to the XML document. It usually contains special instructions for this processor.

Returns
The data of this processing instruction.
String& cxxtools::xml::ProcessingInstruction::data ( )
inline
void cxxtools::xml::ProcessingInstruction::setData ( const String data)
inline

Sets the processor instruction's data.

Parameters
dataThe data for this processing instruction.
void cxxtools::xml::ProcessingInstruction::setTarget ( const String target)
inline

Sets the processor instruction's target.

Parameters
targetThe target for this processing instruction.
const String& cxxtools::xml::ProcessingInstruction::target ( ) const
inline

Returns the processor instruction's target.

The target may be the XML processor for which this PI was added to the XML document.

Returns
The target of this processing instruction.
String& cxxtools::xml::ProcessingInstruction::target ( )
inline

The documentation for this class was generated from the following file: