Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

ProcessingInstruction Class Reference

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

#include <cxxtools/xml/processinginstruction.h>

Inheritance diagram for ProcessingInstruction:

Node

List of all members.

Public Member Functions

 ProcessingInstruction ()
 Constructs a new ProcessingInstruction.
 ~ProcessingInstruction ()
 Empty destructor.
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.


Detailed Description

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

Member Function Documentation

ProcessingInstruction* clone (  )  const [virtual]

Returns:
A cloned version of this CData object.

Implements Node.

const String& target (  )  const

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

Returns:
The target of this processing instruction.

void setTarget ( const String target  ) 

Parameters:
target The target for this processing instruction.

const String& data (  )  const

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.

void setData ( const String data  ) 

Parameters:
data The data for this processing instruction.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6