Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6domxml.h
Go to the documentation of this file.
1 
13 #ifndef P6DOMXML_H__
14 #define P6DOMXML_H__ 1
15 
16 #include "p6err.h"
17 #include "p6datastream.h"
18 #include "p6domxmltypes.h"
19 #include "p6domnodeset.h"
20 #include "p6sax2xmlreader.h"
21 #include "p6jsonreader.h"
22 #include "p6iobuffer.h"
23 
24 
25 #ifdef __cplusplus
26 namespace P6R {
27 extern "C" {
28 #endif
29 
50 typedef struct
51 {
52  P6XPATH_TYPE type; // which type is used?
53  const P6WCHAR* pString; //
54  P6UINT32 strLength; // length of the string pString
65 
66 
82 static const P6DOMOUTPUT P6DOMOUTPUT_XML = 0x00000001;
83 static const P6DOMOUTPUT P6DOMOUTPUT_JSON = 0x00000002;
84 static const P6DOMOUTPUT P6DOMOUTPUT_CHARSETUTF8 = 0x00000004;
85 static const P6DOMOUTPUT P6DOMOUTPUT_JSONML = 0x00000008;
86 static const P6DOMOUTPUT P6DOMOUTPUT_KMIPXML = 0x00000010;
87 static const P6DOMOUTPUT P6DOMOUTPUT_KMIPJSON = 0x00000020;
88 static const P6DOMOUTPUT P6DOMOUTPUT_KMIPJSON_SOLIDUS_ESCAPE = 0x00000040;
89 static const P6DOMOUTPUT P6DOMOUTPUT_PRETTYPRINT = 0x00000080;
90 
91 
100 #undef INTERFACE
101 #define INTERFACE p6IDOMXML
103 {
119  P6DECLCOMMETHOD(initialize)(P6THIS_ P6DOMXMLFLAGS flags, p6IDataStream* pErrorResult ) P6PURE;
120 
141  P6DECLCOMMETHOD(setSAXParser)(P6THIS_ p6ISAX2XMLReader* pReader ) P6PURE;
142 
159  P6DECLCOMMETHOD(setJSONParser)(P6THIS_ p6IJSONReader* pReader ) P6PURE;
160 
176  P6DECLCOMMETHOD(parse)(P6THIS_ p6IDataStream** pInData ) P6PURE;
177 
190  P6DECLCOMMETHOD(parseMessage)(P6THIS_ p6IIoBuffer* pMsg ) P6PURE;
191 
206  P6DECLCOMMETHOD(getRootNode)(P6THIS_ p6IXMLNode** pNode ) P6PURE;
207 
227  P6DECLCOMMETHOD(moveSubTree)(P6THIS_ p6IXMLNode* pParent, p6IXMLNode* pMoveNode ) P6PURE;
228 
242  P6DECLCOMMETHOD(createNodeSet)(P6THIS_ p6IXMLNode* pNode,
243  p6IDOMNodeset** pSet
244  ) P6PURE;
245 
265  P6DECLCOMMETHOD(isParentOf)(P6THIS_ const P6WCHAR* pName,
266  P6UINT32 nameLength,
267  const P6WCHAR* pURI,
268  P6UINT32 uriLength,
269  p6IXMLNode* pNode,
270  p6IXMLNode** pFoundAncestor
271  ) P6PURE;
272 
297  P6DECLCOMMETHOD(isAncestorOf)(P6THIS_ const P6WCHAR* pName,
298  P6UINT32 nameLength,
299  const P6WCHAR* pURI,
300  P6UINT32 uriLength,
301  p6IXMLNode* pNode,
302  p6IXMLNode** pFoundAncestor
303  ) P6PURE;
304 
325  P6DECLCOMMETHOD(stripSpace)(P6THIS_ P6WCHAR* pElementName,
326  P6UINT32 elemLength,
327  P6WCHAR* pNamespaceURI,
328  P6UINT32 uriLength
329  ) P6PURE;
330 
353  P6DECLCOMMETHOD(preserveSpace)(P6THIS_ P6WCHAR* pElementName,
354  P6UINT32 elemLength,
355  P6WCHAR* pNamespaceURI,
356  P6UINT32 uriLength
357  ) P6PURE;
358 
369  P6DECLCOMMETHOD(resetStripSpace)(P6THIS) P6PURE;
370 
379  P6DECLCOMMETHOD(resetPreserveSpace)(P6THIS) P6PURE;
380 
394  P6DECLCOMMETHOD(output)(P6THIS_ p6IDataStream* pStream, P6DOMOUTPUT flags ) P6PURE;
395 
413  P6DECLCOMMETHOD(replaceChildAt)(P6THIS_ p6IXMLNode* pParent, P6UINT32 index, p6IXMLNode* pNewChild ) P6PURE;
414 };
415 
416 // {774F828D-44CE-4e62-86BB-71F939605AFE}
417 #define IF_p6IDOMXML {0x774f828d,0x44ce,0x4e62,{0x86,0xbb,0x71,0xf9,0x39,0x60,0x5a,0xfe}}
418 
419 // {15BBA122-8B01-404b-BC4D-2E7E129437A6}
420 #define COMP_p6DOMXML {0x15bba122,0x8b01,0x404b,{0xbc,0x4d,0x2e,0x7e,0x12,0x94,0x37,0xa6}}
421 
422 #ifdef __cplusplus
423 }
424 } // namespace
425 #endif
426 
427 
428 
429 #endif
430 
431 
432 
433 
434 
435 
const P6WCHAR * pString
Definition: p6domxml.h:53
P6UINT32 strLength
Definition: p6domxml.h:54
uint32_t P6UINT32
Definition: p6types.h:77
P6R's interface of the DOM parser.
Definition: p6domxml.h:102
I/O Buffer Interfaces.
#define P6PURE
Definition: p6defs.h:192
This is the main SAX interface.
Standard error codes.
P6R's Interface of the SAX 2 XML Reader.
The return value form an XPath 2.0 expression evaluation.
Definition: p6domxml.h:50
unsigned char P6BOOL
Boolean type.
Definition: p6types.h:133
Types shared between all XML components.
This interface is an implementation of the following XPath 2.0 time types: xs:date, xs:dateTime, xs:time.
Definition: p6xpathtime.h:29
p6IDataStream interface definitions
P6BSTR binaryResult
Definition: p6domxml.h:56
P6XPATH_TYPE
Part of the XPath type system.
Definition: p6domxmltypes.h:46
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
p6IDOMNodeset * pNodeSet
Definition: p6domxml.h:63
This is the main JSON interface.
Definition: p6jsonreader.h:76
This interface is implmented by components that support receiving streamed data.
Definition: p6datastream.h:44
P6UINT32 P6DOMXMLFLAGS
P6DOMXMLFLAGS.
Definition: p6domxmltypes.h:96
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
int64_t P6INT64
Definition: p6types.h:78
This interface is an enumerator over a set of nodes resulting from the evaluation of an XPath express...
P6XPATH_TYPE type
Definition: p6domxml.h:52
Binary string.
Definition: p6types.h:185
P6BSTR encodedBinary
Definition: p6domxml.h:55
p6IXpathTime * ptResult
Definition: p6domxml.h:61
This interface is an enumerator over a set of nodes resulting from the evaluation of an XPath express...
Definition: p6domnodeset.h:30
This component represents an element in an XML or JSON document.
Definition: p6xmlnode.h:96
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
P6UINT32 uResult
Definition: p6domxml.h:59
#define P6THIS_
Definition: p6defs.h:193
double P6FLOAT
Definition: p6types.h:93
P6UINT32 P6DOMOUTPUT
P6DOMOUTPUT.
Definition: p6domxml.h:81
int32_t P6INT32
Definition: p6types.h:76
#define P6THIS
Definition: p6defs.h:194
P6R's Interface of a SAX-like JSON Reader.
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188