Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6xmlnode.h
Go to the documentation of this file.
1 
13 #ifndef P6XMLNODE_H__
14 #define P6XMLNODE_H__ 1
15 
16 #include "p6err.h"
17 #include "p6comdef.h"
18 #include "p6datastream.h"
19 #include "p6sax2types.h"
20 #include "p6domxmltypes.h"
21 #include "p6xpathtime.h"
22 #include "p6xpathatomized.h"
23 
24 namespace P6R {
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 // Need to know what each node in the tree is used for
31 typedef enum {
32  P6XML_NULL = 0x00, // -> no value
33  P6XML_ROOT = 0x01, // -> top of the P6R document tree; the document root node is one below this node
34  P6XML_LEAF = 0x02, // -> XML (or JSON) element, bottom of the tree for our skeleton, may still have P6XML_CHARS and P6XML_DYNAMICCHARS as children
35  P6XML_NONLEAF = 0x03, // -> connector nodes
36  P6XML_CHARS = 0x04, // -> The value of an XML (or JSON) element
37  P6XML_DYNAMICLEAF = 0x05, // -> Node created dynamically (not from XML file), all children free automatically when node is freed
38  P6XML_DYNAMICNONLEAF = 0x06, // -> Node created dynamically, all children free automatically when node is freed
39  P6XML_DYNAMICCHARS = 0x07, // -> Node created dynamically, all children free automatically when node is freed
40  P6XML_ATTRIBUTE = 0x08, // -> an attribute node (part of an element)
41  P6XML_PROCINSTRUCT = 0x09, // -> the node is an XML processing instruction, its data is stored as a P6XML_CHARS child
42  P6XML_DYNAMICROOT = 0x0A, // -> top of document tree; when tree is dynamically created
43  P6XML_MAX = 0x0A // ->
45 
51 typedef struct
52 {
53  const P6R::P6WCHAR* pName; // -> <book abc:isbn="0-7645-6910-4">XPath 2.0</book>
54  P6R::P6UINT32 nameLength; // -> name is 'book', length is 4
55  const P6R::P6WCHAR* pValue; // -> value is 'XPath 2.0', length is 9
57  const P6R::P6WCHAR* pURI; // -> namespace URI defines the namespace for the
58  P6R::P6UINT32 uriLength; // -> 'abc' is the prefix
59  P6R::P6XPATH_TYPE type; // -> built in XPath type for what is in pValue (if one is defined)
61 
72 const P6XMLNODEFLAGS P6XMLNODE_NOFLAGS = 0x00000000;
73 const P6XMLNODEFLAGS P6XMLNODE_TRACEON = 0x00000001;
74 
82 const P6DOMCHARSET P6DOMCHARSET_UTF8 = 0x00000001;
83 
84 
85 
94 interface p6IXMLNode : public p6ICom
95 {
114  P6COMMETHOD initialize( P6XMLNODEFLAGS flags, P6XMLNodeType type, P6BOOL bDynamic, P6UINT32 nodeId ) = 0;
115 
127  P6COMMETHOD setType( P6XMLNodeType type ) = 0;
128 
140  P6COMMETHOD getType( P6XMLNodeType* pType ) = 0;
141 
155  P6COMMETHOD getNodeId( P6UINT32* pId ) = 0;
156 
169  P6COMMETHOD getParent( p6IXMLNode** pParent ) = 0;
170 
190  P6COMMETHOD isChild( const P6WCHAR* pName,
191  P6UINT32 nameLength,
192  P6UINT32 instance,
193  p6IXMLNode** pExist,
194  P6BOOL* pResult
195  ) = 0;
196 
216  P6COMMETHOD isName( const P6WCHAR* pName,
217  P6UINT32 nameLength,
218  const P6WCHAR* pURI,
219  P6UINT32 uriLength,
220  P6BOOL* pResult
221  ) = 0;
222 
241  P6COMMETHOD toString( P6WCHAR* pBuffer, P6UINT32* pLength ) = 0;
242 
255  P6COMMETHOD toInteger( P6INT32* pNumber ) = 0;
256 
269  P6COMMETHOD toLong( P6INT64* pNumber ) = 0;
270 
283  P6COMMETHOD toDouble( P6FLOAT* pNumber ) = 0;
284 
300  P6COMMETHOD setName( const P6WCHAR* pName, P6UINT32 length ) = 0;
301 
314  P6COMMETHOD getName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
315 
328  P6COMMETHOD getLocalName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
329 
344  P6COMMETHOD getUniqueName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
345 
362  P6COMMETHOD getXMLValidName( P6WCHAR defaultChar, const P6WCHAR** pName, P6UINT32* pLength ) = 0;
363 
377  P6COMMETHOD isXMLValidName( P6BOOL* pResult ) = 0;
378 
391  P6COMMETHOD setURI( const P6WCHAR* pURI, P6UINT32 length ) = 0;
392 
405  P6COMMETHOD getURI( const P6WCHAR** pURI, P6UINT32* pLength ) = 0;
406 
422  P6COMMETHOD setValue( const P6WCHAR* pValue, P6UINT32 length ) = 0;
423 
438  P6COMMETHOD getValue( const P6WCHAR** pValue, P6UINT32* pLength ) = 0;
439 
455 
472 
493  const P6WCHAR** pName,
494  P6UINT32* pNameLength,
495  const P6WCHAR** pValue,
496  P6UINT32* pValueLength
497  ) = 0;
498 
510  P6COMMETHOD getNumChildren( P6UINT32* pCount ) = 0;
511 
524  P6COMMETHOD addChild( p6IXMLNode* pNode ) = 0;
525 
539  P6COMMETHOD removeChildAt( P6UINT32 index ) = 0;
540 
559  P6COMMETHOD replaceChildAt( P6UINT32 index, p6IXMLNode* pNode ) = 0;
560 
570  P6COMMETHOD resetChild() = 0;
571 
585  P6COMMETHOD nextChild( p6IXMLNode** pChild ) = 0;
586 
602  P6COMMETHOD childAt( P6UINT32 index, p6IXMLNode** pChild ) = 0;
603 
615  P6COMMETHOD getNumAttributes( P6UINT32* pCount ) = 0;
616 
635  P6COMMETHOD addAttribute( const P6WCHAR* pName,
636  P6UINT32 nameLength,
637  const P6WCHAR* pValue,
638  P6UINT32 valueLength,
639  const P6WCHAR* pURI,
640  P6UINT32 uriLength
641  ) = 0;
642 
665  P6COMMETHOD getAttribute( const P6WCHAR* pName,
666  P6UINT32 nameLength,
667  P6UINT32 instance,
668  const P6WCHAR** pValue,
669  P6UINT32* pValueLength,
670  const P6WCHAR** pURI,
671  P6UINT32* pUriLength
672  ) = 0;
673 
684 
698  P6COMMETHOD nextAttribute( P6GenericAttrib* pAttrib ) = 0;
699 
715  P6COMMETHOD attributeAt( P6UINT32 index, P6GenericAttrib* pAttrib ) = 0;
716 
731 
742 
751  P6COMMETHOD print() = 0;
752 
768  P6COMMETHOD outputSubTree( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL disableEscaping, P6BOOL omitXMLDecl ) = 0;
769 
786  P6COMMETHOD outputSubTreeInJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
787 
803  P6COMMETHOD outputAsString( p6IDataStream* pStream, P6DOMCHARSET charSet ) = 0;
804 
818  P6COMMETHOD getNumberSortKey( P6INT32* pNumber ) = 0;
819 
832  P6COMMETHOD setNumberSortKey( P6INT32 number ) = 0;
833 
847  P6COMMETHOD getFloatSortKey( P6FLOAT* pNumber ) = 0;
848 
861  P6COMMETHOD setFloatSortKey( P6FLOAT number ) = 0;
862 
876  P6COMMETHOD getLongSortKey( P6INT64* pNumber ) = 0;
877 
890  P6COMMETHOD setLongSortKey( P6INT64 number ) = 0;
891 
906  P6COMMETHOD getStringSortKey( const P6WCHAR** pString, P6UINT32* pLength ) = 0;
907 
922  P6COMMETHOD setStringSortKey( const P6WCHAR* pString, P6UINT32 length ) = 0;
923 
937  P6COMMETHOD getTimeSortKey( p6IXpathTime** pTime ) = 0;
938 
952 
965  P6COMMETHOD getOpaqueValue( P6UINT64* pNumber ) = 0;
966 
978  P6COMMETHOD setOpaqueValue( P6UINT64 number ) = 0;
979 
989 
999 };
1000 
1001 // {C5F407A0-AEB6-4b9f-8151-FB5026A16F40}
1002 #define IF_p6IXMLNode {0xc5f407a0,0xaeb6,0x4b9f,{0x81,0x51,0xfb,0x50,0x26,0xa1,0x6f,0x40}}
1003 
1004 // {6BD6FBC3-66F9-4e65-9603-07007FE46EF7}
1005 #define COMP_p6XMLNode {0x6bd6fbc3,0x66f9,0x4e65,{0x96,0x3,0x7,0x0,0x7f,0xe4,0x6e,0xf7}}
1006 
1007 
1016 interface p6IXMLNode2 : public p6ICom
1017 {
1036  P6COMMETHOD initialize( P6XMLNODEFLAGS flags, P6XMLNodeType type, P6BOOL bDynamic, P6UINT32 nodeId ) = 0;
1037 
1049  P6COMMETHOD setType( P6XMLNodeType type ) = 0;
1050 
1062  P6COMMETHOD getType( P6XMLNodeType* pType ) = 0;
1063 
1077  P6COMMETHOD getNodeId( P6UINT32* pId ) = 0;
1078 
1091  P6COMMETHOD getParent( p6IXMLNode** pParent ) = 0;
1092 
1112  P6COMMETHOD isChild( const P6WCHAR* pName,
1113  P6UINT32 nameLength,
1114  P6UINT32 instance,
1115  p6IXMLNode** pExist,
1116  P6BOOL* pResult
1117  ) = 0;
1118 
1138  P6COMMETHOD isName( const P6WCHAR* pName,
1139  P6UINT32 nameLength,
1140  const P6WCHAR* pURI,
1141  P6UINT32 uriLength,
1142  P6BOOL* pResult
1143  ) = 0;
1144 
1163  P6COMMETHOD toString( P6WCHAR* pBuffer, P6UINT32* pLength ) = 0;
1164 
1177  P6COMMETHOD toInteger( P6INT32* pNumber ) = 0;
1178 
1191  P6COMMETHOD toDouble( P6FLOAT* pNumber ) = 0;
1192 
1208  P6COMMETHOD setName( const P6WCHAR* pName, P6UINT32 length ) = 0;
1209 
1222  P6COMMETHOD getName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1223 
1236  P6COMMETHOD getLocalName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1237 
1252  P6COMMETHOD getUniqueName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1253 
1270  P6COMMETHOD getXMLValidName( P6WCHAR defaultChar, const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1271 
1285  P6COMMETHOD isXMLValidName( P6BOOL* pResult ) = 0;
1286 
1299  P6COMMETHOD setURI( const P6WCHAR* pURI, P6UINT32 length ) = 0;
1300 
1313  P6COMMETHOD getURI( const P6WCHAR** pURI, P6UINT32* pLength ) = 0;
1314 
1330  P6COMMETHOD setValue( const P6WCHAR* pValue, P6UINT32 length ) = 0;
1331 
1346  P6COMMETHOD getValue( const P6WCHAR** pValue, P6UINT32* pLength ) = 0;
1347 
1363 
1380 
1401  const P6WCHAR** pName,
1402  P6UINT32* pNameLength,
1403  const P6WCHAR** pValue,
1404  P6UINT32* pValueLength
1405  ) = 0;
1406 
1418  P6COMMETHOD getNumChildren( P6UINT32* pCount ) = 0;
1419 
1432  P6COMMETHOD addChild( p6IXMLNode* pNode ) = 0;
1433 
1447  P6COMMETHOD removeChildAt( P6UINT32 index ) = 0;
1448 
1467  P6COMMETHOD replaceChildAt( P6UINT32 index, p6IXMLNode* pNode ) = 0;
1468 
1478  P6COMMETHOD resetChild() = 0;
1479 
1493  P6COMMETHOD nextChild( p6IXMLNode** pChild ) = 0;
1494 
1510  P6COMMETHOD childAt( P6UINT32 index, p6IXMLNode** pChild ) = 0;
1511 
1523  P6COMMETHOD getNumAttributes( P6UINT32* pCount ) = 0;
1524 
1543  P6COMMETHOD addAttribute( const P6WCHAR* pName,
1544  P6UINT32 nameLength,
1545  const P6WCHAR* pValue,
1546  P6UINT32 valueLength,
1547  const P6WCHAR* pURI,
1548  P6UINT32 uriLength
1549  ) = 0;
1550 
1573  P6COMMETHOD getAttribute( const P6WCHAR* pName,
1574  P6UINT32 nameLength,
1575  P6UINT32 instance,
1576  const P6WCHAR** pValue,
1577  P6UINT32* pValueLength,
1578  const P6WCHAR** pURI,
1579  P6UINT32* pUriLength
1580  ) = 0;
1581 
1592 
1606  P6COMMETHOD nextAttribute( P6GenericAttrib* pAttrib ) = 0;
1607 
1623  P6COMMETHOD attributeAt( P6UINT32 index, P6GenericAttrib* pAttrib ) = 0;
1624 
1638  P6COMMETHOD removeAttributeAt( P6UINT32 index ) = 0;
1639 
1650 
1659  P6COMMETHOD print() = 0;
1660 
1676  P6COMMETHOD outputSubTree( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL disableEscaping, P6BOOL omitXMLDecl ) = 0;
1677 
1694  P6COMMETHOD outputSubTreeInJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
1695 
1711  P6COMMETHOD outputAsString( p6IDataStream* pStream, P6DOMCHARSET charSet ) = 0;
1712 
1726  P6COMMETHOD getNumberSortKey( P6INT32* pNumber ) = 0;
1727 
1740  P6COMMETHOD setNumberSortKey( P6INT32 number ) = 0;
1741 
1755  P6COMMETHOD getFloatSortKey( P6FLOAT* pNumber ) = 0;
1756 
1769  P6COMMETHOD setFloatSortKey( P6FLOAT number ) = 0;
1770 
1784  P6COMMETHOD getLongSortKey( P6INT64* pNumber ) = 0;
1785 
1798  P6COMMETHOD setLongSortKey( P6INT64 number ) = 0;
1799 
1814  P6COMMETHOD getStringSortKey( const P6WCHAR** pString, P6UINT32* pLength ) = 0;
1815 
1830  P6COMMETHOD setStringSortKey( const P6WCHAR* pString, P6UINT32 length ) = 0;
1831 
1845  P6COMMETHOD getTimeSortKey( p6IXpathTime** pTime ) = 0;
1846 
1859  P6COMMETHOD setTimeSortKey( p6IXpathTime* pTime ) = 0;
1860 
1873  P6COMMETHOD getOpaqueValue( P6UINT64* pNumber ) = 0;
1874 
1886  P6COMMETHOD setOpaqueValue( P6UINT64 number ) = 0;
1887 
1897 
1907 
1927  P6COMMETHOD addAttribute2( const P6WCHAR* pName,
1928  P6UINT32 nameLength,
1929  const P6WCHAR* pValue,
1930  P6UINT32 valueLength,
1931  const P6WCHAR* pURI,
1932  P6UINT32 uriLength,
1933  P6XPATH_TYPE type
1934  ) = 0;
1935 
1959  P6COMMETHOD getAttribute2( const P6WCHAR* pName,
1960  P6UINT32 nameLength,
1961  P6UINT32 instance,
1962  const P6WCHAR** pValue,
1963  P6UINT32* pValueLength,
1964  const P6WCHAR** pURI,
1965  P6UINT32* pUriLength,
1966  P6XPATH_TYPE* pType
1967  ) = 0;
1968 
1985  P6COMMETHOD outputSubTreeInJsonML( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
1986 
2002  P6COMMETHOD outputSubTreeInKMIPXML( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL omitXMLDecl ) = 0;
2003 
2019  P6COMMETHOD outputSubTreeInKMIPJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL bSolidusEscaping ) = 0;
2020 };
2021 
2022 // {83D04569-0AB4-4fad-BE9C-CC5938B434B5}
2023 #define IF_p6IXMLNode2 {0x83d04569,0xab4, 0x4fad,{0xbe,0x9c,0xcc,0x59,0x38,0xb4,0x34,0xb5}}
2024 
2025 
2026 #ifdef __cplusplus
2027 }
2028 #endif
2029 
2030 } // namespace
2031 
2032 
2033 #endif
2034 
2035 
2036 
2037 
2038 
2039 
2040 
virtual P6R::P6ERR removeAttributeAt(P6UINT32 index)=0
This method allows array style access to the attributes of the current node.
XPath 2.0 expressions and XML nodes can be atomized into their base types.
virtual P6R::P6ERR isChild(const P6WCHAR *pName, P6UINT32 nameLength, P6UINT32 instance, p6IXMLNode **pExist, P6BOOL *pResult)=0
There there a child of this XML node with the name of the value in the pName parameter.
This is the standard structure used to point to tokens inside the XML document being parsed...
virtual P6R::P6ERR addRefWithChildren()=0
Perform addref() call on the current node and all its children.
P6LONGLONG P6INT64
Definition: p6types.h:50
virtual P6R::P6ERR removeChildAt(P6UINT32 index)=0
The current node has getNumChildren() number of children.
virtual P6R::P6ERR childAt(P6UINT32 index, p6IXMLNode **pChild)=0
This method allows array style access to the children of the current node.
virtual P6R::P6ERR attributeAt(P6UINT32 index, P6GenericAttrib *pAttrib)=0
This method allows array style access to the attributes of the current node.
virtual P6R::P6ERR toInteger(P6INT32 *pNumber)=0
Convert the contents of the XML node to an integer value.
virtual P6R::P6ERR getNumAttributes(P6UINT32 *pCount)=0
Returns the number of attributes for the current node.
virtual P6R::P6ERR getNodeId(P6UINT32 *pId)=0
Each XML node is give a node id during intialization.
virtual P6R::P6ERR toLong(P6INT64 *pNumber)=0
Convert the contents of the XML node to a long value.
virtual P6R::P6ERR getStringSortKey(const P6WCHAR **pString, P6UINT32 *pLength)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR toString(P6WCHAR *pBuffer, P6UINT32 *pLength)=0
For a node with children this method concatenates all values of each child into the buffer parameter...
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR getURI(const P6WCHAR **pURI, P6UINT32 *pLength)=0
Get the namespace URI associated with the XML node represented by the p6IXMLNode. ...
virtual P6R::P6ERR getTimeSortKey(p6IXpathTime **pTime)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR getFloatSortKey(P6FLOAT *pNumber)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR getNextNamespace(P6UINT32 *pIndex, const P6WCHAR **pName, P6UINT32 *pNameLength, const P6WCHAR **pValue, P6UINT32 *pValueLength)=0
Multiple namespaces can be in scope for an XML node.
const P6R::P6WCHAR * pValue
Definition: p6xmlnode.h:55
virtual P6R::P6ERR initialize(P6XMLNODEFLAGS flags, P6XMLNodeType type, P6BOOL bDynamic, P6UINT32 nodeId)=0
Sets up the component to run properly.
virtual P6R::P6ERR releaseRefWithChildren()=0
Perform release() call on the current node and all its children.
P6R::P6XPATH_TYPE type
Definition: p6xmlnode.h:59
Standard error codes.
const P6XMLNODEFLAGS P6XMLNODE_NOFLAGS
Definition: p6xmlnode.h:72
virtual P6R::P6ERR outputSubTreeInJSON(p6IDataStream *pOutput, P6DOMCHARSET charSet)=0
Write the contents of the subtree rooted at this node in JSON format (see http://www.json.org).
virtual P6R::P6ERR setValue(const P6WCHAR *pValue, P6UINT32 length)=0
Each p6IXMLNode represents an element in an XML document (e.g., &lt;price&gt;5.00lt;/price&gt;.
bool P6BOOL
Boolean type.
Definition: p6types.h:101
Types shared between all XML components.
virtual P6R::P6ERR setXpathValue(P6XPATH_ATOMIZED *pValue)=0
XPath can define the type of a node.
virtual P6R::P6ERR isXMLValidName(P6BOOL *pResult)=0
Since this node can contain data from non-XML sources (e.g., JSON) the node name may have characters ...
P6R::P6UINT32 nameLength
Definition: p6xmlnode.h:54
virtual P6R::P6ERR isName(const P6WCHAR *pName, P6UINT32 nameLength, const P6WCHAR *pURI, P6UINT32 uriLength, P6BOOL *pResult)=0
Test the name of the XML node.
virtual P6R::P6ERR setURI(const P6WCHAR *pURI, P6UINT32 length)=0
Set the namespace URI associated with the XML node represented by the p6IXMLNode. ...
virtual P6R::P6ERR isXMLValidName(P6BOOL *pResult)=0
Since this node can contain data from non-XML sources (e.g., JSON) the node name may have characters ...
virtual P6R::P6ERR getName(const P6WCHAR **pName, P6UINT32 *pLength)=0
Extract out the name of the element, with a namespace prefix if present, represented by the p6IXMLNod...
virtual P6R::P6ERR outputSubTreeInKMIPJSON(p6IDataStream *pOutput, P6DOMCHARSET charSet, P6BOOL bSolidusEscaping)=0
Write the contents of the subtree rooted at this node in the dialect of JSON used by KMIP: OASIS...
virtual P6R::P6ERR setFloatSortKey(P6FLOAT number)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR getAttribute2(const P6WCHAR *pName, P6UINT32 nameLength, P6UINT32 instance, const P6WCHAR **pValue, P6UINT32 *pValueLength, const P6WCHAR **pURI, P6UINT32 *pUriLength, P6XPATH_TYPE *pType)=0
Returned the value of an attribute if it is defined in the XML node.
This interface is an implementation of the following XPath 2.0 time types: xs:date, xs:dateTime, xs:time.
virtual P6R::P6ERR isChild(const P6WCHAR *pName, P6UINT32 nameLength, P6UINT32 instance, p6IXMLNode **pExist, P6BOOL *pResult)=0
There there a child of this XML node with the name of the value in the pName parameter.
virtual P6R::P6ERR initialize(P6XMLNODEFLAGS flags, P6XMLNodeType type, P6BOOL bDynamic, P6UINT32 nodeId)=0
Sets up the component to run properly.
P6UINT32 P6XMLNODEFLAGS
P6XMLNODEFLAGS.
Definition: p6xmlnode.h:71
virtual P6R::P6ERR replaceChildAt(P6UINT32 index, p6IXMLNode *pNode)=0
Note the caller will probably want the function p6IDOMXML::replaceChildAt( pParent, index, pNewChild ) instead of calling this function.
virtual P6R::P6ERR setStringSortKey(const P6WCHAR *pString, P6UINT32 length)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
This interface is an implementation of the following XPath 2.0 time types: xs:date, xs:dateTime, xs:time.
Definition: p6xpathtime.h:27
p6IDataStream interface definitions
virtual P6R::P6ERR setName(const P6WCHAR *pName, P6UINT32 length)=0
Each p6IXMLNode represents an element in an XML document (e.g., &lt;price&gt;5.00&lt;/price&gt;.
virtual P6R::P6ERR getName(const P6WCHAR **pName, P6UINT32 *pLength)=0
Extract out the name of the element, with a namespace prefix if present, represented by the p6IXMLNod...
virtual P6R::P6ERR setOpaqueValue(P6UINT64 number)=0
An application may want to associate a value with a node that is not necessarily related to the nodes...
virtual P6R::P6ERR getXMLValidName(P6WCHAR defaultChar, const P6WCHAR **pName, P6UINT32 *pLength)=0
Since this node can contain data from non-XML sources (e.g., JSON) the node name may have characters ...
virtual P6R::P6ERR getLongSortKey(P6INT64 *pNumber)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR getNextNamespace(P6UINT32 *pIndex, const P6WCHAR **pName, P6UINT32 *pNameLength, const P6WCHAR **pValue, P6UINT32 *pValueLength)=0
Multiple namespaces can be in scope for an XML node.
P6XPATH_TYPE
Part of the XPath type system.
Definition: p6domxmltypes.h:46
virtual P6R::P6ERR getUniqueName(const P6WCHAR **pName, P6UINT32 *pLength)=0
Some applications (e.g., XSLT) require that each node in the DOM tree has a unique node identifier...
virtual P6R::P6ERR toDouble(P6FLOAT *pNumber)=0
Convert the contents of the XML node to an double precision floating point value. ...
virtual P6R::P6ERR setFloatSortKey(P6FLOAT number)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR setNumberSortKey(P6INT32 number)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR resetAttribute()=0
The methods resetAttribute, nextAttribute provide a simple enumerator for all attributes of the curre...
virtual P6R::P6ERR toString(P6WCHAR *pBuffer, P6UINT32 *pLength)=0
For a node with children this method concatenates all values of each child into the buffer parameter...
const P6DOMCHARSET P6DOMCHARSET_UTF8
Definition: p6xmlnode.h:82
virtual P6R::P6ERR print()=0
Write the contents of the XML Node to a log file defined by the system.
P6R::P6UINT32 uriLength
Definition: p6xmlnode.h:58
virtual P6R::P6ERR getNodeId(P6UINT32 *pId)=0
Each XML node is give a node id during intialization.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
virtual P6R::P6ERR addAttribute(const P6WCHAR *pName, P6UINT32 nameLength, const P6WCHAR *pValue, P6UINT32 valueLength, const P6WCHAR *pURI, P6UINT32 uriLength)=0
An XML element can have zero or more attributes (e.g., id=&#39;5&#39;).
virtual P6R::P6ERR resetAttribute()=0
The methods resetAttribute, nextAttribute provide a simple enumerator for all attributes of the curre...
virtual P6R::P6ERR print()=0
Write the contents of the XML Node to a log file defined by the system.
virtual P6R::P6ERR getNumberSortKey(P6INT32 *pNumber)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR outputSubTree(p6IDataStream *pOutput, P6DOMCHARSET charSet, P6BOOL disableEscaping, P6BOOL omitXMLDecl)=0
Write the contents of the subtree rooted at this node in XML format.
virtual P6R::P6ERR nextAttribute(P6GenericAttrib *pAttrib)=0
This method returns the next attribute of the current XML node.
virtual P6R::P6ERR nextAttribute(P6GenericAttrib *pAttrib)=0
This method returns the next attribute of the current XML node.
virtual P6R::P6ERR getNumChildren(P6UINT32 *pCount)=0
Returns the number of child XML nodes the current node is pointing to in the DOMXML tree...
virtual P6R::P6ERR replaceChildAt(P6UINT32 index, p6IXMLNode *pNode)=0
Note the caller will probably want the function p6IDOMXML::replaceChildAt( pParent, index, pNewChild ) instead of calling this function.
virtual P6R::P6ERR toDouble(P6FLOAT *pNumber)=0
Convert the contents of the XML node to an double precision floating point value. ...
This interface is implmented by components that support receiving streamed data.
Definition: p6datastream.h:42
int P6INT32
Definition: p6types.h:41
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR getValue(const P6WCHAR **pValue, P6UINT32 *pLength)=0
Extract the value of the XML node, if present (e.g., &lt;selected/&gt;).
virtual P6R::P6ERR getAttribute(const P6WCHAR *pName, P6UINT32 nameLength, P6UINT32 instance, const P6WCHAR **pValue, P6UINT32 *pValueLength, const P6WCHAR **pURI, P6UINT32 *pUriLength)=0
Returned the value of an attribute if it is defined in the XML node.
P6COM base interface definitions.
virtual P6R::P6ERR outputSubTreeInKMIPXML(p6IDataStream *pOutput, P6DOMCHARSET charSet, P6BOOL omitXMLDecl)=0
Write the contents of the subtree rooted at this node in the dialect of XML used by KMIP: OASIS...
virtual P6R::P6ERR getFloatSortKey(P6FLOAT *pNumber)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR outputSubTreeInJsonML(p6IDataStream *pOutput, P6DOMCHARSET charSet)=0
Write the contents of the subtree rooted at this node in JsonML format (see http://www.jsonml.org).
virtual P6R::P6ERR getXMLValidName(P6WCHAR defaultChar, const P6WCHAR **pName, P6UINT32 *pLength)=0
Since this node can contain data from non-XML sources (e.g., JSON) the node name may have characters ...
virtual P6R::P6ERR addRefWithChildren()=0
Perform addref() call on the node and all its children.
virtual P6R::P6ERR removeWhiteSpace()=0
Remove all unnecessary white space around the current element node.
virtual P6R::P6ERR getStringSortKey(const P6WCHAR **pString, P6UINT32 *pLength)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR getParent(p6IXMLNode **pParent)=0
To support tree walking, this method returns the parent of the current XML node.
virtual P6R::P6ERR addChild(p6IXMLNode *pNode)=0
p6IXMLNode* pLeft-&gt;addChild( pNode ), add the pNode parameter as a child of the pLeft p6IXMLNode...
virtual P6R::P6ERR removeWhiteSpace()=0
Remove all unnecessary white space around the current element node.
virtual P6R::P6ERR resetChild()=0
The methods resetChild, nextChild provide a simple enumerator for all child XML node of the current n...
P6XMLNodeType
Definition: p6xmlnode.h:31
virtual P6R::P6ERR removeAttributeAt(P6UINT32 index)=0
This method allows array style access to the attributes of the current node.
virtual P6R::P6ERR attributeAt(P6UINT32 index, P6GenericAttrib *pAttrib)=0
This method allows array style access to the attributes of the current node.
virtual P6R::P6ERR getType(P6XMLNodeType *pType)=0
Returns the type of the node: is it a leaf, a character node, tree root, etc?
virtual P6R::P6ERR setStringSortKey(const P6WCHAR *pString, P6UINT32 length)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
const P6R::P6WCHAR * pName
Definition: p6xmlnode.h:53
P6ULONGLONG P6UINT64
Definition: p6types.h:49
virtual P6R::P6ERR nextChild(p6IXMLNode **pChild)=0
This method returns the next child of the current XML node.
virtual P6R::P6ERR getNumberSortKey(P6INT32 *pNumber)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR setNumberSortKey(P6INT32 number)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR setOpaqueValue(P6UINT64 number)=0
An application may want to associate a value with a node that is not necessarily related to the nodes...
virtual P6R::P6ERR getOpaqueValue(P6UINT64 *pNumber)=0
An application may want to associate a value with a node that is not necessarily related to the nodes...
virtual P6R::P6ERR getNumAttributes(P6UINT32 *pCount)=0
Returns the number of attributes for the current node.
virtual P6R::P6ERR getXpathValue(P6XPATH_ATOMIZED *pValue)=0
XPath can define the type of a node.
const P6R::P6WCHAR * pURI
Definition: p6xmlnode.h:57
This component represents an element in an XML, JSON, or JsonML document.
Definition: p6xmlnode.h:1016
virtual P6R::P6ERR childAt(P6UINT32 index, p6IXMLNode **pChild)=0
This method allows array style access to the children of the current node.
virtual P6R::P6ERR outputSubTree(p6IDataStream *pOutput, P6DOMCHARSET charSet, P6BOOL disableEscaping, P6BOOL omitXMLDecl)=0
Write the contents of the subtree rooted at this node in XML format.
virtual P6R::P6ERR outputAsString(p6IDataStream *pStream, P6DOMCHARSET charSet)=0
For a node with children this method concatentates all values of each child and writes their values t...
virtual P6R::P6ERR setTimeSortKey(p6IXpathTime *pTime)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR getLocalName(const P6WCHAR **pName, P6UINT32 *pLength)=0
Extract out the name of the element, without a namespace prefix, represented by the p6IXMLNode...
virtual P6R::P6ERR releaseRefWithChildren()=0
Perform release() call on the current node and all its children.
virtual P6R::P6ERR addAttribute(const P6WCHAR *pName, P6UINT32 nameLength, const P6WCHAR *pValue, P6UINT32 valueLength, const P6WCHAR *pURI, P6UINT32 uriLength)=0
An XML element can have zero or more attributes (e.g., id=&#39;5&#39;).
virtual P6R::P6ERR getURI(const P6WCHAR **pURI, P6UINT32 *pLength)=0
Get the namespace URI associated with the XML node represented by the p6IXMLNode. ...
This component represents an element in an XML or JSON document.
Definition: p6xmlnode.h:94
virtual P6R::P6ERR addChild(p6IXMLNode *pNode)=0
p6IXMLNode* pLeft-&gt;addChild( pNode ), add the pNode parameter as a child of the pLeft p6IXMLNode...
virtual P6R::P6ERR outputSubTreeInJSON(p6IDataStream *pOutput, P6DOMCHARSET charSet)=0
Write the contents of the subtree rooted at this node in JSON format (see http://www.json.org).
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR setLongSortKey(P6INT64 number)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
const P6XMLNODEFLAGS P6XMLNODE_TRACEON
Definition: p6xmlnode.h:73
virtual P6R::P6ERR getLocalName(const P6WCHAR **pName, P6UINT32 *pLength)=0
Extract out the name of the element, without a namespace prefix, represented by the p6IXMLNode...
virtual P6R::P6ERR getNumChildren(P6UINT32 *pCount)=0
Returns the number of child XML nodes the current node is pointing to in the DOMXML tree...
virtual P6R::P6ERR setName(const P6WCHAR *pName, P6UINT32 length)=0
Each p6IXMLNode represents an element in an XML document (e.g., &lt;price&gt;5.00&lt;/price&gt;.
virtual P6R::P6ERR getXpathValue(P6XPATH_ATOMIZED *pValue)=0
XPath can define the type of a node.
virtual P6R::P6ERR getLongSortKey(P6INT64 *pNumber)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR isName(const P6WCHAR *pName, P6UINT32 nameLength, const P6WCHAR *pURI, P6UINT32 uriLength, P6BOOL *pResult)=0
Test the name of the XML node.
double P6FLOAT
Definition: p6types.h:63
virtual P6R::P6ERR setType(P6XMLNodeType type)=0
Allows the application to change the type of the node set during initialization.
virtual P6R::P6ERR outputAsString(p6IDataStream *pStream, P6DOMCHARSET charSet)=0
For a node with children this method concatentates all values of each child and writes their values t...
virtual P6R::P6ERR setLongSortKey(P6INT64 number)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
virtual P6R::P6ERR getUniqueName(const P6WCHAR **pName, P6UINT32 *pLength)=0
Some applications (e.g., XSLT) require that each node in the DOM tree has a unique node identifier...
virtual P6R::P6ERR addAttribute2(const P6WCHAR *pName, P6UINT32 nameLength, const P6WCHAR *pValue, P6UINT32 valueLength, const P6WCHAR *pURI, P6UINT32 uriLength, P6XPATH_TYPE type)=0
An XML element can have zero or more attributes (e.g., id=&#39;5&#39;).
virtual P6R::P6ERR nextChild(p6IXMLNode **pChild)=0
This method returns the next child of the current XML node.
virtual P6R::P6ERR resetChild()=0
The methods resetChild, nextChild provide a simple enumerator for all child XML node of the current n...
virtual P6R::P6ERR removeChildAt(P6UINT32 index)=0
The current node has getNumChildren() number of children.
virtual P6R::P6ERR getAttribute(const P6WCHAR *pName, P6UINT32 nameLength, P6UINT32 instance, const P6WCHAR **pValue, P6UINT32 *pValueLength, const P6WCHAR **pURI, P6UINT32 *pUriLength)=0
Returned the value of an attribute if it is defined in the XML node.
virtual P6R::P6ERR getParent(p6IXMLNode **pParent)=0
To support tree walking, this method returns the parent of the current XML node.
virtual P6R::P6ERR getTimeSortKey(p6IXpathTime **pTime)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
Results and components of XPath expressions can use one of these base types.
virtual P6R::P6ERR getValue(const P6WCHAR **pValue, P6UINT32 *pLength)=0
Extract the value of the XML node, if present (e.g., &lt;selected/&gt;).
virtual P6R::P6ERR toInteger(P6INT32 *pNumber)=0
Convert the contents of the XML node to an integer value.
virtual P6R::P6ERR setTimeSortKey(p6IXpathTime *pTime)=0
This method is used to support sorting of p6IXMLNode components in a p6IDOMNodeset container...
P6UINT32 P6DOMCHARSET
P6DOMCHARSET.
Definition: p6xmlnode.h:81
Parts of an element&#39;s attribute.
Definition: p6xmlnode.h:51
virtual P6R::P6ERR setType(P6XMLNodeType type)=0
Allows the application to change the type of the node set during initialization.
virtual P6R::P6ERR setValue(const P6WCHAR *pValue, P6UINT32 length)=0
Each p6IXMLNode represents an element in an XML document (e.g., &lt;price&gt;5.00lt;/price&gt;.
virtual P6R::P6ERR getType(P6XMLNodeType *pType)=0
Returns the type of the node: is it a leaf, a character node, tree root, etc?
virtual P6R::P6ERR setXpathValue(P6XPATH_ATOMIZED *pValue)=0
XPath can define the type of a node.
virtual P6R::P6ERR getOpaqueValue(P6UINT64 *pNumber)=0
An application may want to associate a value with a node that is not necessarily related to the nodes...
P6R::P6UINT32 valueLength
Definition: p6xmlnode.h:56
virtual P6R::P6ERR setURI(const P6WCHAR *pURI, P6UINT32 length)=0
Set the namespace URI associated with the XML node represented by the p6IXMLNode. ...