CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
XMLParser Class Reference

## Public Member Functions
| __construct ($Encoding="UTF-8")
| Object constructor. More...
| ParseText ($Text, $LastTextToParse=TRUE)
| Parse text stream and store result. More...
| SeekTo ()
| Move current tag pointer to specified item. More...
| SeekToParent ()
| Move seek pointer up one level. More...
| SeekToChild ($ChildIndex=0)
| Move seek pointer to first child of current tag. More...
| SeekToRoot ()
| Move seek pointer to root of tree. More...
| NextTag ()
| Move to next tag at current level. More...
| NextItem ()
| Move to next instance of current tag. More...
| PreviousItem ()
| Move to previous instance of current tag. More...
| GetTagName ()
| Retrieve tag name from current seek point. More...
| GetData ()
| Retrieve data from current seek point. More...
| GetAttribute ()
| Retrieve specified attribute from current seek point or specified point below. More...
| GetAttributes ()
| Retrieve specified attributes from current seek point or specified point below. More...

## Detailed Description

Definition at line 10 of file XMLParser.php.

## Constructor & Destructor Documentation

XMLParser::__construct | ( |  | $Encoding = `"UTF-8"` | ) |

Object constructor.

Parameters

  string | $Encoding | Character encoding to use.

Definition at line 18 of file XMLParser.php.

## Member Function Documentation

XMLParser::GetAttribute | ( |  | ) |

Retrieve specified attribute from current seek point or specified point below.

First argument is attribute name and subsequent optional arguments tell where to seek to.

Returns
  string Specified tag or NULL if no such attribute for current.

Definition at line 333 of file XMLParser.php.

XMLParser::GetAttributes | ( |  | ) |

Retrieve specified attributes from current seek point or specified point below.

First argument is attribute name and subsequent optional arguments tell where to seek to.

Returns
  string Specified tags or NULL if no such attribute for current.

Definition at line 353 of file XMLParser.php.

XMLParser::GetData | ( |  | ) |

Retrieve data from current seek point.

Returns
  string Data or NULL if no data found.

See also
  PerformSeek()

Definition at line 280 of file XMLParser.php.

XMLParser::GetTagName | ( |  | ) |

Retrieve tag name from current seek point.

Returns
  string Tag name or NULL if no tag found.

Definition at line 263 of file XMLParser.php.

XMLParser::NextItem | ( |  | ) |

Move to next instance of current tag.

Returns
  int Index or NULL if no next.

Definition at line 202 of file XMLParser.php.

XMLParser::NextTag | ( |  | ) |

Move to next tag at current level.

Returns
  string Tag name or NULL if no next tag.

Definition at line 171 of file XMLParser.php.

XMLParser::ParseText | ( |  | $Text,
|  |  | $LastTextToParse = `TRUE`
| ) |  |

Parse text stream and store result.

Parameters

  string | $Text | Text stream to parse.
  bool | $LastTextToParse | If TRUE, this is the last incoming text.

Definition at line 46 of file XMLParser.php.

XMLParser::PreviousItem | ( |  | ) |

Move to previous instance of current tag.

Returns
  int Index or NULL on fail.

Definition at line 234 of file XMLParser.php.

XMLParser::SeekTo | ( |  | ) |

Move current tag pointer to specified item.

Arguments may be tag names or indexes.

Returns
  int Count of tags found at location, or NULL on failure.

Definition at line 57 of file XMLParser.php.

XMLParser::SeekToChild | ( |  | $ChildIndex = `0` | ) |

Move seek pointer to first child of current tag.

Parameters

  int | $ChildIndex | Index to find.

Returns
  string Tag name or NULL if no children.

Definition at line 128 of file XMLParser.php.

XMLParser::SeekToParent | ( |  | ) |

Move seek pointer up one level.

Returns
  string Tag name or NULL if no parent.

Definition at line 95 of file XMLParser.php.

XMLParser::SeekToRoot | ( |  | ) |

Move seek pointer to root of tree.

Definition at line 162 of file XMLParser.php.

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

- lib/ScoutLib/XMLParser.php