MADARA  3.0.6
tinyxml.cpp File Reference
#include <ctype.h>
#include "tinyxml.h"
Include dependency graph for tinyxml.cpp:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const TiXmlNode &base)
 
std::string & operator<< (std::string &out, const TiXmlNode &base)
 
std::istream & operator>> (std::istream &in, TiXmlNode &base)
 
FILE * TiXmlFOpen (const char *filename, const char *mode)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const TiXmlNode base 
)

Note that this outputs without any newlines or formatting, as opposed to Print(), which includes tabs and new lines.

The operator<< and operator>> are not completely symmetric. Writing a node to a stream is very well defined. You'll get a nice stream of output, without any extra whitespace or newlines.

But reading is not as well defined. (As it always is.) If you create a TiXmlElement (for example) and read that from an input stream, the text needs to define an element or junk will result. This is true of all input streams, but it's worth keeping in mind.

A TiXmlDocument will read nodes until it reads a root element, and all the children of that root element.

Definition at line 1564 of file tinyxml.cpp.

std::string& operator<< ( std::string &  out,
const TiXmlNode base 
)

Definition at line 1575 of file tinyxml.cpp.

std::istream& operator>> ( std::istream &  in,
TiXmlNode base 
)

Tolerant of newlines and formatting, but doesn't expect them.

Definition at line 1551 of file tinyxml.cpp.

FILE * TiXmlFOpen ( const char *  filename,
const char *  mode 
)

Definition at line 41 of file tinyxml.cpp.