Ets_Xml_Export()
Abstract
Exports a specified network model to an XML file.
Syntax
Ets_Xml_Export (model_hndl, output_filename, postproc_func, client_data_ptr)
| Argument | Type | Description |
|---|---|---|
model_hndl |
EtsT_Model_Handle |
Specifies the network model to export to XML format. |
output_filename |
const char * |
The name of the XML file that will be generated. |
postproc_func |
EtsT_Xml_Export_Postproc_Func |
A callback function that will be invoked after the base XML data has been generated. |
client_data_ptr |
void * |
State pointer passed to each invocation of the postproc_func. |
Return Type
EtsT_Compcode
EtsC_Compcode_Success if the export succeeded; EtsC_Compcode_Failure if a failure occurred during export. Failures can occur if you run out of memory, if the target filepath specified was invalid, and so on.
Header
ets_api_xml.h
Details
This function allows the caller to convert a specified in-memory network model to XML form and store it on disk. The caller supplies the model being exported, the target filename, and a post-processing function that can further flesh out the XML output.
During the export process, the application first generates an intermediary description of the specified network model. This description is in terms of xmlNode data structures in the World Wide Web Consortium's (W3C) libxml format.
After this skeleton has been generated, the post-processing function postproc_func is invoked for every object to allow the caller to attach additional information to the XML description for that object. The prototype of the postproc function is given in EtsT_Xml_Export_Postproc_Func.
The default post-processing function is Nt_Xmle_Postproc_Default(). It takes a client data pointer that can be a pointer to any user-defined structure.
The XML schema (DTD) is stored in <reldir>/sys/etc/network.dtd.