You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -20,28 +22,82 @@ Allows you to access data sources as string data when you have no knowledge of t
20
22
```cpp
21
23
classCXMLAccessor : publicCDynamicStringAccessorW
22
24
```
25
+
26
+
## Requirements
27
+
**Header**: atldbcli.h
23
28
24
29
## Members
25
30
26
31
### Methods
27
32
28
33
|||
29
34
|-|-|
30
-
|[GetXMLColumnData](../../data/oledb/cxmlaccessor-getxmlcolumndata.md)|Retrieves the column information.|
31
-
|[GetXMLRowData](../../data/oledb/cxmlaccessor-getxmlrowdata.md)|Retrieves the entire contents of a table by rows.|
35
+
|[GetXMLColumnData](#getxmlcolumndata)|Retrieves the column information.|
36
+
|[GetXMLRowData](#getxmlrowdata)|Retrieves the entire contents of a table by rows.|
32
37
33
38
## Remarks
34
39
However, `CXMLAccessor` differs from `CDynamicStringAccessorW` in that it converts all data accessed from the data store as XML-formatted (tagged) data. This is especially useful for output to XML-aware Web pages. The XML tag names will match the data store's column names as closely as possible.
35
40
36
41
Use `CDynamicAccessor` methods to obtain column information. You use this column information to create an accessor dynamically at run time.
37
42
38
-
The column information is stored in a buffer created and managed by this class. Obtain column information using [GetXMLColumnData](../../data/oledb/cxmlaccessor-getxmlcolumndata.md) or obtain column data by rows using [GetXMLRowData](../../data/oledb/cxmlaccessor-getxmlrowdata.md).
43
+
The column information is stored in a buffer created and managed by this class. Obtain column information using [GetXMLColumnData](#getxmlcolumndata) or obtain column data by rows using [GetXMLRowData](#getxmlrowdata).
[out] A reference to a string buffer containing the column type information to be retrieved. The string is formatted with XML tag names that match the data store's column names.
60
+
61
+
### Return Value
62
+
One of the standard HRESULT values.
63
+
64
+
### Remarks
65
+
The following shows how the column type information is formatted in XML. `type` specifies the column's data type. Note that the data types are based on OLE DB data types, not those of the database being accessed.
Retrieves the entire contents of a table as XML-formatted string data, by row.
75
+
76
+
### Syntax
77
+
78
+
```cpp
79
+
HRESULT GetXMLRowData(CSimpleStringW& strOutput,
80
+
bool bAppend = false) throw();
81
+
```
82
+
83
+
#### Parameters
84
+
*strOutput*
85
+
[out] A reference to a buffer containing the table data to be retrieved. The data is formatted as string data with XML tag names that match the data store's column names.
86
+
87
+
*bAppend*
88
+
[in] A Boolean value specifying whether to append a string to the end of the output data.
89
+
90
+
### Return Value
91
+
One of the standard HRESULT values.
92
+
93
+
### Remarks
94
+
The following shows how the row data is formatted in XML. `DATA` below represents the row data. Use move methods to move to the desired row.
95
+
96
+
`<row>`
97
+
98
+
`<column name>DATA</column name>`
99
+
100
+
`</row>`
45
101
46
102
## See Also
47
103
[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)
0 commit comments