Planeshift
psXMLString Class Reference

#include <psxmlparser.h>

Public Member Functions

size_t FindNextTag (size_t start)
 
int FindTag (const char *tagName, int start=0)
 
size_t GetTag (int start, psXMLTag &tag)
 
size_t GetTagSection (int start, const char *tagName, psXMLString &tagSection)
 
size_t GetWithinTagSection (int start, const char *tagName, psXMLString &tagSection)
 GetWithinTagSection return the psXMLString section text of a tag. More...
 
size_t GetWithinTagSection (int start, const char *tagName, csString &value)
 GetWithinTagSection return a csString containing the text in a tag section. More...
 
size_t GetWithinTagSection (int start, const char *tagName, int &value)
 
size_t GetWithinTagSection (int start, const char *tagName, double &value)
 
void operator= (const char *str)
 
 psXMLString ()
 
 psXMLString (const char *str)
 
- Public Member Functions inherited from psString
size_t FindCommonLength (const psString &other) const
 
bool FindNumber (unsigned int &pos, unsigned int &end) const
 
bool FindString (const char *border, unsigned int &pos, unsigned int &end) const
 
int FindSubString (const char *sub, size_t start=0, bool caseInsense=XML_CASE_SENSITIVE, bool wholeWord=false) const
 
int FindSubStringReverse (psString &sub, size_t start, bool caseInsense=XML_CASE_SENSITIVE)
 
void GetLine (size_t start, csString &line) const
 
void GetSubString (psString &str, size_t from, size_t to) const
 
void GetWord (size_t pos, psString &buff, bool wantPunct=INCLUDE_PUNCT) const
 
void GetWordNumber (int which, psString &buff) const
 
bool IsVowel (size_t pos)
 
bool operator< (const psString &other) const
 
bool operator== (const psString &other) const
 
bool operator== (const char *other) const
 
int PartialEquals (const psString &other) const
 
psStringPlural ()
 Check if a character is a vowel. More...
 
 psString ()
 
 psString (const char *str)
 
 psString (const csStringBase &str)
 
 psString (const csString &str)
 
bool ReplaceSubString (const char *what, const char *with)
 
void Split (csStringArray &result, char delim='|')
 Turn the last word of the string into an English plural. More...
 

Protected Member Functions

size_t FindMatchingEndTag (int iStart, const char *tagName)
 

Additional Inherited Members

- Public Types inherited from psString
enum  { NO_PUNCT =0, INCLUDE_PUNCT =1 }
 

Detailed Description

Definition at line 70 of file psxmlparser.h.

Constructor & Destructor Documentation

psXMLString::psXMLString ( )
inline

Definition at line 73 of file psxmlparser.h.

psXMLString::psXMLString ( const char *  str)
inline

Definition at line 74 of file psxmlparser.h.

Member Function Documentation

size_t psXMLString::FindMatchingEndTag ( int  iStart,
const char *  tagName 
)
protected
size_t psXMLString::FindNextTag ( size_t  start)
int psXMLString::FindTag ( const char *  tagName,
int  start = 0 
)
size_t psXMLString::GetTag ( int  start,
psXMLTag tag 
)
size_t psXMLString::GetTagSection ( int  start,
const char *  tagName,
psXMLString tagSection 
)
size_t psXMLString::GetWithinTagSection ( int  start,
const char *  tagName,
psXMLString tagSection 
)

GetWithinTagSection return the psXMLString section text of a tag.

<TAG>XML</TAG>
Parameters
startThe start position.
tagNameThe name of the tag.
tagSectionReturn the section text. If tag not found returning "".
size_t psXMLString::GetWithinTagSection ( int  start,
const char *  tagName,
csString &  value 
)

GetWithinTagSection return a csString containing the text in a tag section.

<TAG>Text</TAG>
Parameters
startThe start position.
tagNameThe name of the tag.
valueReturn the section text. If TAG not found the string isn't modified.
size_t psXMLString::GetWithinTagSection ( int  start,
const char *  tagName,
int value 
)
size_t psXMLString::GetWithinTagSection ( int  start,
const char *  tagName,
double &  value 
)
void psXMLString::operator= ( const char *  str)
inline

Definition at line 105 of file psxmlparser.h.


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