Go to the documentation of this file.
22 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_DXML)
23 #error Buildsystem error: BUILDING_PANDA_DXML not defined
26 Configure(config_dxml);
27 NotifyCategoryDef(dxml,
"");
29 ConfigureFn(config_dxml) {
41 static bool initialized =
false;
57 if (in.fail() && !in.eof()) {
82 xnode->
Print(stdout, 0);
96 if (fopen_s(&file, os_name.c_str(),
"w") != 0) {
98 FILE *file = fopen(os_name.c_str(),
"w");
99 if (file ==
nullptr) {
101 dxml_cat.error() <<
"Failed to open " << filename <<
" for writing\n";
103 xnode->
Print(file, 0);
Always the top level node.
END_PUBLISH BEGIN_PUBLISH void write_xml_stream(std::ostream &out, TiXmlDocument *doc)
Writes an XML document to the indicated stream.
void init_libdxml()
Initializes the library.
std::string to_os_specific() const
Converts the filename from our generic Unix-like convention (forward slashes starting with the root a...
END_PUBLISH BEGIN_PUBLISH void print_xml_to_file(const Filename &filename, TiXmlNode *xnode)
Writes an XML object to the indicated file, with formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The parent class for everything in the Document Object Model.
virtual void Print(FILE *cfile, int depth) const =0
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
END_PUBLISH BEGIN_PUBLISH void print_xml(TiXmlNode *xnode)
Writes an XML object to stdout, with formatting.
BEGIN_PUBLISH TiXmlDocument * read_xml_stream(std::istream &in)
Reads an XML document from the indicated stream.
The name of a file, such as a texture file or an Egg file.