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);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BEGIN_PUBLISH TiXmlDocument * read_xml_stream(std::istream &in)
Reads an XML document from the indicated stream.
END_PUBLISH BEGIN_PUBLISH void print_xml_to_file(const Filename &filename, TiXmlNode *xnode)
Writes an XML object to the indicated file, with formatting.
END_PUBLISH BEGIN_PUBLISH void print_xml(TiXmlNode *xnode)
Writes an XML object to stdout, with formatting.
The name of a file, such as a texture file or an Egg file.
Always the top level node.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The parent class for everything in the Document Object Model.
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...
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 ...