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 
560  P6COMMETHOD replaceChildAt( P6UINT32 index, p6IXMLNode* pNode ) = 0;
561 
571  P6COMMETHOD resetChild() = 0;
572 
586  P6COMMETHOD nextChild( p6IXMLNode** pChild ) = 0;
587 
603  P6COMMETHOD childAt( P6UINT32 index, p6IXMLNode** pChild ) = 0;
604 
616  P6COMMETHOD getNumAttributes( P6UINT32* pCount ) = 0;
617 
636  P6COMMETHOD addAttribute( const P6WCHAR* pName,
637  P6UINT32 nameLength,
638  const P6WCHAR* pValue,
639  P6UINT32 valueLength,
640  const P6WCHAR* pURI,
641  P6UINT32 uriLength
642  ) = 0;
643 
666  P6COMMETHOD getAttribute( const P6WCHAR* pName,
667  P6UINT32 nameLength,
668  P6UINT32 instance,
669  const P6WCHAR** pValue,
670  P6UINT32* pValueLength,
671  const P6WCHAR** pURI,
672  P6UINT32* pUriLength
673  ) = 0;
674 
685 
699  P6COMMETHOD nextAttribute( P6GenericAttrib* pAttrib ) = 0;
700 
716  P6COMMETHOD attributeAt( P6UINT32 index, P6GenericAttrib* pAttrib ) = 0;
717 
732 
743 
752  P6COMMETHOD print() = 0;
753 
769  P6COMMETHOD outputSubTree( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL disableEscaping, P6BOOL omitXMLDecl ) = 0;
770 
787  P6COMMETHOD outputSubTreeInJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
788 
804  P6COMMETHOD outputAsString( p6IDataStream* pStream, P6DOMCHARSET charSet ) = 0;
805 
819  P6COMMETHOD getNumberSortKey( P6INT32* pNumber ) = 0;
820 
833  P6COMMETHOD setNumberSortKey( P6INT32 number ) = 0;
834 
848  P6COMMETHOD getFloatSortKey( P6FLOAT* pNumber ) = 0;
849 
862  P6COMMETHOD setFloatSortKey( P6FLOAT number ) = 0;
863 
877  P6COMMETHOD getLongSortKey( P6INT64* pNumber ) = 0;
878 
891  P6COMMETHOD setLongSortKey( P6INT64 number ) = 0;
892 
907  P6COMMETHOD getStringSortKey( const P6WCHAR** pString, P6UINT32* pLength ) = 0;
908 
923  P6COMMETHOD setStringSortKey( const P6WCHAR* pString, P6UINT32 length ) = 0;
924 
938  P6COMMETHOD getTimeSortKey( p6IXpathTime** pTime ) = 0;
939 
953 
966  P6COMMETHOD getOpaqueValue( P6UINT64* pNumber ) = 0;
967 
979  P6COMMETHOD setOpaqueValue( P6UINT64 number ) = 0;
980 
990 
1000 };
1001 
1002 // {C5F407A0-AEB6-4b9f-8151-FB5026A16F40}
1003 #define IF_p6IXMLNode {0xc5f407a0,0xaeb6,0x4b9f,{0x81,0x51,0xfb,0x50,0x26,0xa1,0x6f,0x40}}
1004 
1005 // {6BD6FBC3-66F9-4e65-9603-07007FE46EF7}
1006 #define COMP_p6XMLNode {0x6bd6fbc3,0x66f9,0x4e65,{0x96,0x3,0x7,0x0,0x7f,0xe4,0x6e,0xf7}}
1007 
1008 
1017 interface p6IXMLNode2 : public p6ICom
1018 {
1037  P6COMMETHOD initialize( P6XMLNODEFLAGS flags, P6XMLNodeType type, P6BOOL bDynamic, P6UINT32 nodeId ) = 0;
1038 
1050  P6COMMETHOD setType( P6XMLNodeType type ) = 0;
1051 
1063  P6COMMETHOD getType( P6XMLNodeType* pType ) = 0;
1064 
1078  P6COMMETHOD getNodeId( P6UINT32* pId ) = 0;
1079 
1092  P6COMMETHOD getParent( p6IXMLNode** pParent ) = 0;
1093 
1113  P6COMMETHOD isChild( const P6WCHAR* pName,
1114  P6UINT32 nameLength,
1115  P6UINT32 instance,
1116  p6IXMLNode** pExist,
1117  P6BOOL* pResult
1118  ) = 0;
1119 
1139  P6COMMETHOD isName( const P6WCHAR* pName,
1140  P6UINT32 nameLength,
1141  const P6WCHAR* pURI,
1142  P6UINT32 uriLength,
1143  P6BOOL* pResult
1144  ) = 0;
1145 
1164  P6COMMETHOD toString( P6WCHAR* pBuffer, P6UINT32* pLength ) = 0;
1165 
1178  P6COMMETHOD toInteger( P6INT32* pNumber ) = 0;
1179 
1192  P6COMMETHOD toDouble( P6FLOAT* pNumber ) = 0;
1193 
1209  P6COMMETHOD setName( const P6WCHAR* pName, P6UINT32 length ) = 0;
1210 
1223  P6COMMETHOD getName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1224 
1237  P6COMMETHOD getLocalName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1238 
1253  P6COMMETHOD getUniqueName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1254 
1271  P6COMMETHOD getXMLValidName( P6WCHAR defaultChar, const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1272 
1286  P6COMMETHOD isXMLValidName( P6BOOL* pResult ) = 0;
1287 
1300  P6COMMETHOD setURI( const P6WCHAR* pURI, P6UINT32 length ) = 0;
1301 
1314  P6COMMETHOD getURI( const P6WCHAR** pURI, P6UINT32* pLength ) = 0;
1315 
1331  P6COMMETHOD setValue( const P6WCHAR* pValue, P6UINT32 length ) = 0;
1332 
1347  P6COMMETHOD getValue( const P6WCHAR** pValue, P6UINT32* pLength ) = 0;
1348 
1364 
1381 
1402  const P6WCHAR** pName,
1403  P6UINT32* pNameLength,
1404  const P6WCHAR** pValue,
1405  P6UINT32* pValueLength
1406  ) = 0;
1407 
1419  P6COMMETHOD getNumChildren( P6UINT32* pCount ) = 0;
1420 
1433  P6COMMETHOD addChild( p6IXMLNode* pNode ) = 0;
1434 
1448  P6COMMETHOD removeChildAt( P6UINT32 index ) = 0;
1449 
1468  P6COMMETHOD replaceChildAt( P6UINT32 index, p6IXMLNode* pNode ) = 0;
1469 
1479  P6COMMETHOD resetChild() = 0;
1480 
1494  P6COMMETHOD nextChild( p6IXMLNode** pChild ) = 0;
1495 
1511  P6COMMETHOD childAt( P6UINT32 index, p6IXMLNode** pChild ) = 0;
1512 
1524  P6COMMETHOD getNumAttributes( P6UINT32* pCount ) = 0;
1525 
1544  P6COMMETHOD addAttribute( const P6WCHAR* pName,
1545  P6UINT32 nameLength,
1546  const P6WCHAR* pValue,
1547  P6UINT32 valueLength,
1548  const P6WCHAR* pURI,
1549  P6UINT32 uriLength
1550  ) = 0;
1551 
1574  P6COMMETHOD getAttribute( const P6WCHAR* pName,
1575  P6UINT32 nameLength,
1576  P6UINT32 instance,
1577  const P6WCHAR** pValue,
1578  P6UINT32* pValueLength,
1579  const P6WCHAR** pURI,
1580  P6UINT32* pUriLength
1581  ) = 0;
1582 
1593 
1607  P6COMMETHOD nextAttribute( P6GenericAttrib* pAttrib ) = 0;
1608 
1624  P6COMMETHOD attributeAt( P6UINT32 index, P6GenericAttrib* pAttrib ) = 0;
1625 
1639  P6COMMETHOD removeAttributeAt( P6UINT32 index ) = 0;
1640 
1651 
1660  P6COMMETHOD print() = 0;
1661 
1677  P6COMMETHOD outputSubTree( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL disableEscaping, P6BOOL omitXMLDecl ) = 0;
1678 
1695  P6COMMETHOD outputSubTreeInJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
1696 
1712  P6COMMETHOD outputAsString( p6IDataStream* pStream, P6DOMCHARSET charSet ) = 0;
1713 
1727  P6COMMETHOD getNumberSortKey( P6INT32* pNumber ) = 0;
1728 
1741  P6COMMETHOD setNumberSortKey( P6INT32 number ) = 0;
1742 
1756  P6COMMETHOD getFloatSortKey( P6FLOAT* pNumber ) = 0;
1757 
1770  P6COMMETHOD setFloatSortKey( P6FLOAT number ) = 0;
1771 
1785  P6COMMETHOD getLongSortKey( P6INT64* pNumber ) = 0;
1786 
1799  P6COMMETHOD setLongSortKey( P6INT64 number ) = 0;
1800 
1815  P6COMMETHOD getStringSortKey( const P6WCHAR** pString, P6UINT32* pLength ) = 0;
1816 
1831  P6COMMETHOD setStringSortKey( const P6WCHAR* pString, P6UINT32 length ) = 0;
1832 
1846  P6COMMETHOD getTimeSortKey( p6IXpathTime** pTime ) = 0;
1847 
1860  P6COMMETHOD setTimeSortKey( p6IXpathTime* pTime ) = 0;
1861 
1874  P6COMMETHOD getOpaqueValue( P6UINT64* pNumber ) = 0;
1875 
1887  P6COMMETHOD setOpaqueValue( P6UINT64 number ) = 0;
1888 
1898 
1908 
1928  P6COMMETHOD addAttribute2( const P6WCHAR* pName,
1929  P6UINT32 nameLength,
1930  const P6WCHAR* pValue,
1931  P6UINT32 valueLength,
1932  const P6WCHAR* pURI,
1933  P6UINT32 uriLength,
1934  P6XPATH_TYPE type
1935  ) = 0;
1936 
1960  P6COMMETHOD getAttribute2( const P6WCHAR* pName,
1961  P6UINT32 nameLength,
1962  P6UINT32 instance,
1963  const P6WCHAR** pValue,
1964  P6UINT32* pValueLength,
1965  const P6WCHAR** pURI,
1966  P6UINT32* pUriLength,
1967  P6XPATH_TYPE* pType
1968  ) = 0;
1969 
1986  P6COMMETHOD outputSubTreeInJsonML( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
1987 
2003  P6COMMETHOD outputSubTreeInKMIPXML( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL omitXMLDecl ) = 0;
2004 
2020  P6COMMETHOD outputSubTreeInKMIPJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL bSolidusEscaping ) = 0;
2021 };
2022 
2023 // {83D04569-0AB4-4fad-BE9C-CC5938B434B5}
2024 #define IF_p6IXMLNode2 {0x83d04569,0xab4, 0x4fad,{0xbe,0x9c,0xcc,0x59,0x38,0xb4,0x34,0xb5}}
2025 
2026 
2027 #ifdef __cplusplus
2028 }
2029 #endif
2030 
2031 } // namespace
2032 
2033 
2034 #endif
2035 
2036 
2037 
2038 
2039 
2040 
2041 
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
Deprecated Note the caller will probably want the function p6IDOMXML::replaceChildAt( pParent...
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:1017
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:917
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. ...