X3D libraries
The libraries to work with X3D dataset

xml_writer.c++ File Reference

Implementation of the XML Writer. More...


Namespaces

namespace  x3dxml

Defines

#define X3D_XML_HEADER

Variables

static const int ATTR_SIZE = 256
static const int BUFFER_SIZE = 1024 * 4
int f_errno
x3dio::ErrorCallbackf_error_callback
x3dio::Streamf_stream


Detailed Description

Implementation of the XML Writer.

This file includes a class used to write an X3D node tree to an XML file using the UTF-8 encoding.

To use the writer, instanciate an object on your stack or otherwise with the new operator and call the Save() function with the proper parameters:

 ... // create the x3d_tree
 x3dio::FileStream stream;
 stream.Create("my_shape.x3d");
 x3dxml::XMLWriter xml_out;
 // note: ignore errors
 xml_out.Save(stream, x3d_tree);
 exit(0);

The file includes an internal class which is not documented. It is static to this file.


Define Documentation

#define X3D_XML_HEADER
 

Value:

"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" \
        "<!DOCTYPE X3D PUBLIC \"ISO//Web3D//DTD X3D 3.0//EN\" \"http://www.web3d.org/specifications/x3d-3.0.dtd\">\n"