North State Framework in C#  V3.0.0
An object-oriented framework for implementing UML state machines.
Public Member Functions | Properties | List of all members
NSFXMLElement Class Reference

Represents an xml element in an xml document. More...

Public Member Functions

 NSFXMLElement ()
 Creates an xml element. More...
 
 NSFXMLElement (NSFString tag)
 Creates an xml element. More...
 
 NSFXMLElement (NSFString tag, NSFString text)
 Creates an xml element. More...
 
 NSFXMLElement (NSFXMLElement copyElement)
 Creates an xml element. More...
 
void addChildElementBack (NSFXMLElement childElement)
 Adds an element to the back of the child element list. More...
 
void addChildElementFront (NSFXMLElement childElement)
 Adds an element to the front of the child element list. More...
 
bool containsChildElement ()
 Checks if the element contains any child elements. More...
 
bool containsChildElement (NSFString childTag)
 Checks if the element contains any child elements with the specified tag. More...
 
void deleteChildElement (NSFXMLElement childElement)
 Deletes the specified child element. More...
 
bool deleteChildElementBack ()
 Deletes the element at the back of the child element list. More...
 
bool deleteChildElementFront ()
 Deletes the element at the front of the child element list. More...
 
NSFXMLElement getChildElement (NSFString childTag)
 Gets the first child element with the specified tag. More...
 
NSFXMLElement getChildElementBack ()
 Gets the last child element. More...
 
NSFXMLElement getChildElementFront ()
 Gets the first child element. More...
 
NSFXMLElement getNextElement (NSFXMLElement childElement)
 Gets the next child element after the specified child element. More...
 
NSFXMLElement getNextElement (NSFXMLElement childElement, NSFString nextTag)
 Gets the next child element after the specified child element, with the specified tag. More...
 
int getNumberOfChildElements ()
 Gets the number of child elements More...
 
NSFXMLElement getParentElement ()
 Gets the parent element. More...
 
NSFXMLElement getParentElement (NSFString parentTag)
 Gets the first parent element with the specified tag. More...
 
bool loadBuffer (NSFString buffer)
 Loads the element data from a string buffer. The buffer must be in valid XML format. More...
 
void save (StreamWriter stream)
 Saves the element to the specified stream. More...
 

Properties

NSFString Tag [get, set]
 
NSFString Text [get, set]
 

Detailed Description

Represents an xml element in an xml document.

This is a companion class to NSFXMLDocument.

Constructor & Destructor Documentation

Creates an xml element.

Creates an xml element.

Parameters
tagThe tag for the element.
NSFXMLElement ( NSFString  tag,
NSFString  text 
)

Creates an xml element.

Parameters
tagThe tag for the element.
textThe text for the element.
NSFXMLElement ( NSFXMLElement  copyElement)

Creates an xml element.

Parameters
copyElementThe element to copy.

Member Function Documentation

void addChildElementBack ( NSFXMLElement  childElement)

Adds an element to the back of the child element list.

void addChildElementFront ( NSFXMLElement  childElement)

Adds an element to the front of the child element list.

bool containsChildElement ( )

Checks if the element contains any child elements.

Returns
True if any child elements, false otherwise.
bool containsChildElement ( NSFString  childTag)

Checks if the element contains any child elements with the specified tag.

Parameters
childTagThe child element tag.
Returns
True if contains, false otherwise.
void deleteChildElement ( NSFXMLElement  childElement)

Deletes the specified child element.

Parameters
childElementThe element to delete.
bool deleteChildElementBack ( )

Deletes the element at the back of the child element list.

Returns
True if successful, false otherwise.
bool deleteChildElementFront ( )

Deletes the element at the front of the child element list.

Returns
True if successful, false otherwise.
NSFXMLElement getChildElement ( NSFString  childTag)

Gets the first child element with the specified tag.

Parameters
childTagThe child element to tag.
Returns
The child element, or NULL if none exist.
NSFXMLElement getChildElementBack ( )

Gets the last child element.

Returns
The child element, or NULL if none exist.
NSFXMLElement getChildElementFront ( )

Gets the first child element.

Returns
The child element, or NULL if none exist.
NSFXMLElement getNextElement ( NSFXMLElement  childElement)

Gets the next child element after the specified child element.

Parameters
childElementThe child element before the returned child element.
Returns
The child element, or NULL if none exist.
NSFXMLElement getNextElement ( NSFXMLElement  childElement,
NSFString  nextTag 
)

Gets the next child element after the specified child element, with the specified tag.

Parameters
childElementThe child element before the returned child element.
nextTagThe child element tag.
Returns
The child element, or NULL if none exist.
int getNumberOfChildElements ( )

Gets the number of child elements

Returns
The number of child elements.
NSFXMLElement getParentElement ( )

Gets the parent element.

Returns
The child element, or NULL if none exist.
NSFXMLElement getParentElement ( NSFString  parentTag)

Gets the first parent element with the specified tag.

Parameters
parentTagThe parent element tag.
Returns
The parent element, or NULL if none exist.
bool loadBuffer ( NSFString  buffer)

Loads the element data from a string buffer. The buffer must be in valid XML format.

Returns
True if successful, false otherwise.
void save ( StreamWriter  stream)

Saves the element to the specified stream.

Parameters
streamThe stream.

Property Documentation

NSFString Tag
getset
NSFString Text
getset



Copyright 2004-2014, North State Software, LLC. All rights reserved.