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 
558  P6COMMETHOD replaceChildAt( P6UINT32 index, p6IXMLNode* pNode ) = 0;
559 
569  P6COMMETHOD resetChild() = 0;
570 
584  P6COMMETHOD nextChild( p6IXMLNode** pChild ) = 0;
585 
601  P6COMMETHOD childAt( P6UINT32 index, p6IXMLNode** pChild ) = 0;
602 
614  P6COMMETHOD getNumAttributes( P6UINT32* pCount ) = 0;
615 
634  P6COMMETHOD addAttribute( const P6WCHAR* pName,
635  P6UINT32 nameLength,
636  const P6WCHAR* pValue,
637  P6UINT32 valueLength,
638  const P6WCHAR* pURI,
639  P6UINT32 uriLength
640  ) = 0;
641 
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 };
980 
981 // {C5F407A0-AEB6-4b9f-8151-FB5026A16F40}
982 #define IF_p6IXMLNode {0xc5f407a0,0xaeb6,0x4b9f,{0x81,0x51,0xfb,0x50,0x26,0xa1,0x6f,0x40}}
983 
984 // {6BD6FBC3-66F9-4e65-9603-07007FE46EF7}
985 #define COMP_p6XMLNode {0x6bd6fbc3,0x66f9,0x4e65,{0x96,0x3,0x7,0x0,0x7f,0xe4,0x6e,0xf7}}
986 
987 
996 interface p6IXMLNode2 : public p6ICom
997 {
1016  P6COMMETHOD initialize( P6XMLNODEFLAGS flags, P6XMLNodeType type, P6BOOL bDynamic, P6UINT32 nodeId ) = 0;
1017 
1029  P6COMMETHOD setType( P6XMLNodeType type ) = 0;
1030 
1042  P6COMMETHOD getType( P6XMLNodeType* pType ) = 0;
1043 
1057  P6COMMETHOD getNodeId( P6UINT32* pId ) = 0;
1058 
1071  P6COMMETHOD getParent( p6IXMLNode** pParent ) = 0;
1072 
1092  P6COMMETHOD isChild( const P6WCHAR* pName,
1093  P6UINT32 nameLength,
1094  P6UINT32 instance,
1095  p6IXMLNode** pExist,
1096  P6BOOL* pResult
1097  ) = 0;
1098 
1118  P6COMMETHOD isName( const P6WCHAR* pName,
1119  P6UINT32 nameLength,
1120  const P6WCHAR* pURI,
1121  P6UINT32 uriLength,
1122  P6BOOL* pResult
1123  ) = 0;
1124 
1143  P6COMMETHOD toString( P6WCHAR* pBuffer, P6UINT32* pLength ) = 0;
1144 
1157  P6COMMETHOD toInteger( P6INT32* pNumber ) = 0;
1158 
1171  P6COMMETHOD toDouble( P6FLOAT* pNumber ) = 0;
1172 
1188  P6COMMETHOD setName( const P6WCHAR* pName, P6UINT32 length ) = 0;
1189 
1202  P6COMMETHOD getName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1203 
1216  P6COMMETHOD getLocalName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1217 
1232  P6COMMETHOD getUniqueName( const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1233 
1250  P6COMMETHOD getXMLValidName( P6WCHAR defaultChar, const P6WCHAR** pName, P6UINT32* pLength ) = 0;
1251 
1265  P6COMMETHOD isXMLValidName( P6BOOL* pResult ) = 0;
1266 
1279  P6COMMETHOD setURI( const P6WCHAR* pURI, P6UINT32 length ) = 0;
1280 
1293  P6COMMETHOD getURI( const P6WCHAR** pURI, P6UINT32* pLength ) = 0;
1294 
1310  P6COMMETHOD setValue( const P6WCHAR* pValue, P6UINT32 length ) = 0;
1311 
1326  P6COMMETHOD getValue( const P6WCHAR** pValue, P6UINT32* pLength ) = 0;
1327 
1343 
1360 
1381  const P6WCHAR** pName,
1382  P6UINT32* pNameLength,
1383  const P6WCHAR** pValue,
1384  P6UINT32* pValueLength
1385  ) = 0;
1386 
1398  P6COMMETHOD getNumChildren( P6UINT32* pCount ) = 0;
1399 
1412  P6COMMETHOD addChild( p6IXMLNode* pNode ) = 0;
1413 
1427  P6COMMETHOD removeChildAt( P6UINT32 index ) = 0;
1428 
1446  P6COMMETHOD replaceChildAt( P6UINT32 index, p6IXMLNode* pNode ) = 0;
1447 
1457  P6COMMETHOD resetChild() = 0;
1458 
1472  P6COMMETHOD nextChild( p6IXMLNode** pChild ) = 0;
1473 
1489  P6COMMETHOD childAt( P6UINT32 index, p6IXMLNode** pChild ) = 0;
1490 
1502  P6COMMETHOD getNumAttributes( P6UINT32* pCount ) = 0;
1503 
1522  P6COMMETHOD addAttribute( const P6WCHAR* pName,
1523  P6UINT32 nameLength,
1524  const P6WCHAR* pValue,
1525  P6UINT32 valueLength,
1526  const P6WCHAR* pURI,
1527  P6UINT32 uriLength
1528  ) = 0;
1529 
1553  P6COMMETHOD getAttribute( const P6WCHAR* pName,
1554  P6UINT32 nameLength,
1555  P6UINT32 instance,
1556  const P6WCHAR** pValue,
1557  P6UINT32* pValueLength,
1558  const P6WCHAR** pURI,
1559  P6UINT32* pUriLength
1560  ) = 0;
1561 
1572 
1586  P6COMMETHOD nextAttribute( P6GenericAttrib* pAttrib ) = 0;
1587 
1603  P6COMMETHOD attributeAt( P6UINT32 index, P6GenericAttrib* pAttrib ) = 0;
1604 
1618  P6COMMETHOD removeAttributeAt( P6UINT32 index ) = 0;
1619 
1630 
1639  P6COMMETHOD print() = 0;
1640 
1656  P6COMMETHOD outputSubTree( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL disableEscaping, P6BOOL omitXMLDecl ) = 0;
1657 
1674  P6COMMETHOD outputSubTreeInJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
1675 
1691  P6COMMETHOD outputAsString( p6IDataStream* pStream, P6DOMCHARSET charSet ) = 0;
1692 
1706  P6COMMETHOD getNumberSortKey( P6INT32* pNumber ) = 0;
1707 
1720  P6COMMETHOD setNumberSortKey( P6INT32 number ) = 0;
1721 
1735  P6COMMETHOD getFloatSortKey( P6FLOAT* pNumber ) = 0;
1736 
1749  P6COMMETHOD setFloatSortKey( P6FLOAT number ) = 0;
1750 
1764  P6COMMETHOD getLongSortKey( P6INT64* pNumber ) = 0;
1765 
1778  P6COMMETHOD setLongSortKey( P6INT64 number ) = 0;
1779 
1794  P6COMMETHOD getStringSortKey( const P6WCHAR** pString, P6UINT32* pLength ) = 0;
1795 
1810  P6COMMETHOD setStringSortKey( const P6WCHAR* pString, P6UINT32 length ) = 0;
1811 
1825  P6COMMETHOD getTimeSortKey( p6IXpathTime** pTime ) = 0;
1826 
1839  P6COMMETHOD setTimeSortKey( p6IXpathTime* pTime ) = 0;
1840 
1853  P6COMMETHOD getOpaqueValue( P6UINT64* pNumber ) = 0;
1854 
1866  P6COMMETHOD setOpaqueValue( P6UINT64 number ) = 0;
1867 
1887  P6COMMETHOD addAttribute2( const P6WCHAR* pName,
1888  P6UINT32 nameLength,
1889  const P6WCHAR* pValue,
1890  P6UINT32 valueLength,
1891  const P6WCHAR* pURI,
1892  P6UINT32 uriLength,
1893  P6XPATH_TYPE type
1894  ) = 0;
1895 
1920  P6COMMETHOD getAttribute2( const P6WCHAR* pName,
1921  P6UINT32 nameLength,
1922  P6UINT32 instance,
1923  const P6WCHAR** pValue,
1924  P6UINT32* pValueLength,
1925  const P6WCHAR** pURI,
1926  P6UINT32* pUriLength,
1927  P6XPATH_TYPE* pType
1928  ) = 0;
1929 
1946  P6COMMETHOD outputSubTreeInJsonML( p6IDataStream* pOutput, P6DOMCHARSET charSet ) = 0;
1947 
1963  P6COMMETHOD outputSubTreeInKMIPXML( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL omitXMLDecl ) = 0;
1964 
1980  P6COMMETHOD outputSubTreeInKMIPJSON( p6IDataStream* pOutput, P6DOMCHARSET charSet, P6BOOL bSolidusEscaping ) = 0;
1981 };
1982 
1983 // {83D04569-0AB4-4fad-BE9C-CC5938B434B5}
1984 #define IF_p6IXMLNode2 {0x83d04569,0xab4, 0x4fad,{0xbe,0x9c,0xcc,0x59,0x38,0xb4,0x34,0xb5}}
1985 
1986 
1987 #ifdef __cplusplus
1988 }
1989 #endif
1990 
1991 } // namespace
1992 
1993 
1994 #endif
1995 
1996 
1997 
1998 
1999 
2000 
2001 
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...
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.
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 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:996
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 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:863
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. ...