Panda3D
Public Member Functions | List of all members
TiXmlDeclaration Class Reference

** In correct XML the declaration is the first entry in the file. More...

Inheritance diagram for TiXmlDeclaration:
TiXmlNode TiXmlBase

Public Member Functions

 __init__ ()
 Construct an empty declaration. More...
 
 __init__ (const TiXmlDeclaration copy)
 
 __init__ (str _version, str _encoding, str _standalone)
 Construct. More...
 
 __init__ (str _version, str _encoding, str _standalone)
 Constructor. More...
 
str Encoding ()
 Encoding. Will return an empty string if none was found. More...
 
TiXmlDeclaration operator= (const TiXmlDeclaration copy)
 
 Print (FILE cfile, int depth, String str)
 Print this declaration to a FILE stream. More...
 
str Standalone ()
 Is this a standalone document? More...
 
str Version ()
 Version. Will return an empty string if none was found. More...
 
- Public Member Functions inherited from TiXmlNode
bool Accept (TiXmlVisitor visitor)
 ** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the XML tree will be conditionally visited and the host will be called back via the TiXmlVisitor interface. More...
 
 Clear ()
 Delete all the children of this node. Does not affect 'this'. More...
 
TiXmlNode Clone ()
 ** Create an exact duplicate of this node and return it. The memory must be deleted by the caller. */ More...
 
TiXmlNode FirstChild ()
 < The first child of this node. Will be null if there are no children. More...
 
const TiXmlNode FirstChild ()
 < The first child of this node. Will be null if there are no children. More...
 
TiXmlNode FirstChild (str _value)
 < The first child of this node with the matching 'value'. Will be null if none found. The first child of this node with the matching 'value'. Will be null if none found. More...
 
const TiXmlNode FirstChild (str value)
 
TiXmlNode FirstChild (str _value)
 < STL std::string form. More...
 
const TiXmlNode FirstChild (str _value)
 < STL std::string form. More...
 
TiXmlElement FirstChildElement ()
 
const TiXmlElement FirstChildElement ()
 Convenience function to get through elements. More...
 
TiXmlElement FirstChildElement (str _value)
 
const TiXmlElement FirstChildElement (str _value)
 Convenience function to get through elements. More...
 
TiXmlElement FirstChildElement (str _value)
 < STL std::string form. More...
 
const TiXmlElement FirstChildElement (str _value)
 < STL std::string form. More...
 
TiXmlDocument GetDocument ()
 
const TiXmlDocument GetDocument ()
 ** Return a pointer to the Document this node lives in. Returns null if not in a document. */ More...
 
TiXmlNode InsertAfterChild (TiXmlNode afterThis, const TiXmlNode addThis)
 ** Add a new node related to this. Adds a child after the specified child. Returns a pointer to the new object or NULL if an error occured. */ More...
 
TiXmlNode InsertBeforeChild (TiXmlNode beforeThis, const TiXmlNode addThis)
 ** Add a new node related to this. Adds a child before the specified child. Returns a pointer to the new object or NULL if an error occured. */ More...
 
TiXmlNode InsertEndChild (const TiXmlNode addThis)
 ** Add a new node related to this. Adds a child past the LastChild. Returns a pointer to the new object or NULL if an error occured. */ More...
 
TiXmlNode IterateChildren (const TiXmlNode previous)
 
const TiXmlNode IterateChildren (const TiXmlNode previous)
 ** An alternate way to walk the children of a node. One way to iterate over nodes is: More...
 
TiXmlNode IterateChildren (str _value, const TiXmlNode previous)
 
const TiXmlNode IterateChildren (str value, const TiXmlNode previous)
 This flavor of IterateChildren searches for children with a particular 'value'. More...
 
TiXmlNode IterateChildren (str _value, const TiXmlNode previous)
 < STL std::string form. More...
 
const TiXmlNode IterateChildren (str _value, const TiXmlNode previous)
 < STL std::string form. More...
 
TiXmlNode LastChild ()
 The last child of this node. Will be null if there are no children. More...
 
const TiXmlNode LastChild ()
 The last child of this node. Will be null if there are no children. More...
 
TiXmlNode LastChild (str _value)
 The last child of this node matching 'value'. Will be null if there are no children. More...
 
const TiXmlNode LastChild (str value)
 The last child of this node matching 'value'. Will be null if there are no children. More...
 
TiXmlNode LastChild (str _value)
 < STL std::string form. More...
 
const TiXmlNode LastChild (str _value)
 < STL std::string form. More...
 
TiXmlNode NextSibling ()
 
const TiXmlNode NextSibling ()
 Navigate to a sibling node. More...
 
TiXmlNode NextSibling (str _next)
 
const TiXmlNode NextSibling (str)
 Navigate to a sibling node with the given 'value'. More...
 
TiXmlNode NextSibling (str _value)
 < STL std::string form. More...
 
const TiXmlNode NextSibling (str _value)
 < STL std::string form. More...
 
TiXmlElement NextSiblingElement ()
 
const TiXmlElement NextSiblingElement ()
 ** Convenience function to get through elements. Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. */ More...
 
TiXmlElement NextSiblingElement (str _next)
 
const TiXmlElement NextSiblingElement (str)
 ** Convenience function to get through elements. Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. */ More...
 
TiXmlElement NextSiblingElement (str _value)
 < STL std::string form. More...
 
const TiXmlElement NextSiblingElement (str _value)
 < STL std::string form. More...
 
bool NoChildren ()
 Returns true if this node has no children. More...
 
TiXmlNode Parent ()
 One step up the DOM. More...
 
const TiXmlNode Parent ()
 
TiXmlNode PreviousSibling ()
 
const TiXmlNode PreviousSibling ()
 Navigate to a sibling node. More...
 
TiXmlNode PreviousSibling (str _prev)
 
const TiXmlNode PreviousSibling (str)
 Navigate to a sibling node. More...
 
TiXmlNode PreviousSibling (str _value)
 < STL std::string form. More...
 
const TiXmlNode PreviousSibling (str _value)
 < STL std::string form. More...
 
bool RemoveChild (TiXmlNode removeThis)
 Delete a child of this node. More...
 
TiXmlNode ReplaceChild (TiXmlNode replaceThis, const TiXmlNode withThis)
 ** Replace a child of this node. Returns a pointer to the new object or NULL if an error occured. */ More...
 
 SetValue (str _value)
 ** Changes the value of the node. Defined as: More...
 
 SetValue (str _value)
 STL std::string form. More...
 
TiXmlComment ToComment ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
const TiXmlComment ToComment ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
TiXmlDeclaration ToDeclaration ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
const TiXmlDeclaration ToDeclaration ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
TiXmlDocument ToDocument ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
const TiXmlDocument ToDocument ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
TiXmlElement ToElement ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
const TiXmlElement ToElement ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
TiXmlText ToText ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
const TiXmlText ToText ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
TiXmlUnknown ToUnknown ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
const TiXmlUnknown ToUnknown ()
 < Cast to a more defined type. Will return null if not of the requested type. More...
 
int Type ()
 ** Query the type (as an enumerated value, above) of this node. The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION. */ More...
 
str Value ()
 ** The meaning of 'value' changes for the specific type of TiXmlNode. More...
 
str ValueStr ()
 ** Return Value() as a std::string. If you only use STL, this is more efficient than calling Value(). Only available in STL mode. */ More...
 
str ValueTStr ()
 
- Public Member Functions inherited from TiXmlBase
int Column ()
 < See Row() More...
 
 GetUserData ()
 < Get a pointer to arbitrary user data. More...
 
 GetUserData ()
 < Get a pointer to arbitrary user data. More...
 
str Parse (str p, TiXmlParsingData data, TiXmlEncoding encoding)
 
 Print (FILE cfile, int depth)
 ** All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.) Either or both cfile and str can be null. More...
 
int Row ()
 ** Return the position, in the original source file, of this node or attribute. The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value. More...
 

Additional Inherited Members

- Public Types inherited from TiXmlNode
enum  NodeType {
  TINYXML_DOCUMENT = 0, TINYXML_ELEMENT = 1, TINYXML_COMMENT = 2, TINYXML_UNKNOWN = 3,
  TINYXML_TEXT = 4, TINYXML_DECLARATION = 5, TINYXML_TYPECOUNT = 6
}
 ** The types of XML nodes supported by TinyXml. (All the unsupported types are picked up by UNKNOWN.) */ More...
 
- Public Types inherited from TiXmlBase
enum  {
  TIXML_NO_ERROR = 0, TIXML_ERROR = 1, TIXML_ERROR_OPENING_FILE = 2, TIXML_ERROR_PARSING_ELEMENT = 3,
  TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME = 4, TIXML_ERROR_READING_ELEMENT_VALUE = 5, TIXML_ERROR_READING_ATTRIBUTES = 6, TIXML_ERROR_PARSING_EMPTY = 7,
  TIXML_ERROR_READING_END_TAG = 8, TIXML_ERROR_PARSING_UNKNOWN = 9, TIXML_ERROR_PARSING_COMMENT = 10, TIXML_ERROR_PARSING_DECLARATION = 11,
  TIXML_ERROR_DOCUMENT_EMPTY = 12, TIXML_ERROR_EMBEDDED_NULL = 13, TIXML_ERROR_PARSING_CDATA = 14, TIXML_ERROR_DOCUMENT_TOP_ONLY = 15,
  TIXML_ERROR_STRING_COUNT = 16
}
 
- Static Public Member Functions inherited from TiXmlBase
static EncodeString (str str, String out)
 ** Expands entities in a string. Note this should not contian the tag's '<', '>', etc, or they will be transformed into entities! */ More...
 
static bool IsWhiteSpaceCondensed ()
 Return the current white space setting. More...
 
static SetCondenseWhiteSpace (bool condense)
 ** The world does not agree on whether white space should be kept or not. In order to make everyone happy, these global, static functions are provided to set whether or not TinyXml will condense all white space into a single space or not. The default is to condense. Note changing this value is not thread safe. */ More...
 

Detailed Description

** In correct XML the declaration is the first entry in the file.

<?xml version="1.0" standalone="yes"?>

TinyXml will happily read or write files without a declaration, however. There are 3 possible attributes to the declaration: version, encoding, and standalone.

Note: In this version of the code, the attributes are handled as special cases, not generic attributes, simply because there can only be at most 3 and they are always the same. */

Member Function Documentation

◆ __init__() [1/4]

__init__ ( )

Construct an empty declaration.

◆ __init__() [2/4]

__init__ ( const TiXmlDeclaration  copy)

◆ __init__() [3/4]

__init__ ( str  _version,
str  _encoding,
str  _standalone 
)

Construct.

◆ __init__() [4/4]

__init__ ( str  _version,
str  _encoding,
str  _standalone 
)

Constructor.

◆ Encoding()

str Encoding ( )

Encoding. Will return an empty string if none was found.

◆ operator=()

TiXmlDeclaration operator= ( const TiXmlDeclaration  copy)

◆ Print()

Print ( FILE  cfile,
int  depth,
String  str 
)

Print this declaration to a FILE stream.

◆ Standalone()

str Standalone ( )

Is this a standalone document?

◆ Version()

str Version ( )

Version. Will return an empty string if none was found.