CoreDX DDS C++ Reference Manual
xml_api.h
Go to the documentation of this file.
1 /*****************************************************************
2  * file: xml_api.h
3  * desc: Generalized XML API used by CoreDX DDS.
4  *
5  *****************************************************************
6  *
7  * Copyright(C) 2006-2016 Twin Oaks Computing, Inc
8  * All rights reserved. Castle Rock, CO 80108
9  *
10  *****************************************************************
11  * This software has been provided pursuant to a License Agreement
12  * containing restrictions on its use. This software contains
13  * valuable trade secrets and proprietary information of
14  * Twin Oaks Computing, Inc and is protected by law. It may not be
15  * copied or distributed in any form or medium, disclosed to third
16  * parties, reverse engineered or used in any manner not provided
17  * for in said License Agreement except with the prior written
18  * authorization from Twin Oaks Computing, Inc.
19  *****************************************************************/
20 
21 #ifndef DDS_XML_API_H
22 #define DDS_XML_API_H
23 
24 #include <dds/dds_export.h>
25 #include <dds/dds_inttypes.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30 
37  typedef struct _CdxXmlDocument * CDX_XmlDocument;
38  typedef struct _CdxXmlNode * CDX_XmlNode;
39 
40 # define CDX_XML_ELEMENT_NODE 0x0001
41 # define CDX_XML_TEXT_NODE 0x0002
42 
53  typedef struct CDX_XmlApi
54  {
55  CDX_XmlDocument (*read_file)(const char * filename);
56  CDX_XmlDocument (*parse_data)(const char * data, int32_t len);
57  CDX_XmlNode (*top_node)(CDX_XmlDocument doc);
58  void (*free_document)(CDX_XmlDocument doc);
59  void (*cleanup)();
60 
61  const char * (*get_name)(CDX_XmlNode node);
62  char * (*get_prop)(CDX_XmlNode node, const char * prop_name);
63  void (*free_prop)(CDX_XmlNode node, char * prop );
64  unsigned char (*has_children)(CDX_XmlNode node);
65  CDX_XmlNode (*get_children)(CDX_XmlNode node);
66  CDX_XmlNode (*get_next)(CDX_XmlNode node);
67  unsigned short (*get_type)(CDX_XmlNode node);
68  const char * (*get_content)(CDX_XmlNode node);
69  } CDX_XmlApi;
70 
75  COREDX_C_ADD_API CDX_XmlApi cdx_libxml2_impl;
76 
80  COREDX_C_ADD_API CDX_XmlApi cdx_xml_impl;
81 
82 #ifdef __cplusplus
83 }
84 #endif /* __cplusplus */
85 
86 #endif
Provides a generic XML Parser capability.
Definition: xml_api.h:53
CDX_XmlApi cdx_libxml2_impl
the "dds_libxml2api" library provides this implementation that is based on libxml2 ...
Definition: xml_api.h:75
CDX_XmlApi cdx_xml_impl
the "dds_xml" library provides this internal XML parser implementation
Definition: xml_api.h:80

© 2009-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.