XmlToCursor Function |
Namespace: XSharp.VFP
Note |
---|
XMLTOCURSOR( ) generates an error if eExpression is not found or if eExpression does not parse to valid XML. |
nFlags | Bit | Description |
---|---|---|
0 | 0000 | (Default) Treats the first parameter as a string containing XML data. |
4 | 0100 | Preserves white space in data and overrides the xml:space attribute of the XML data. |
512 | 01000000000 | Specifies that the first parameter, either an eExpression or a cXMLFile, is a string containing the name and path of an XML data file. |
1024 | 10000000000 |
NOCPTRANS – Creates Character and Memo fields in the resultant cursor with the NOCPTRANS option and inserts the text or
XML values in the incoming elements into the Character or Memo field on an untranslated, byte-for-byte basis. When used with flag 1024, XMLTOCURSOR( ) returns a string padded with trailing spaces equal to the actual string, that is, a string twice the length. |
2048 | 100000000000 |
Use when the imported schema has an XML schema definition (XSD) schema containing decimal data type with restrictions, or facets,
of totalDigits="19" and fractionDigits="4." XSD data type values are mapped to the X# Currency data type in the resulting cursor. |
4096 | 1000000000000 |
Disables base64 decoding. In X#, base64 encoding is intended for encoding only binary data. |
8192 | 1100000000 |
Specifies that cCursorName is the name or alias of an existing table or cursor and imports the data from the specified XML file into
an existing table or predefined cursor. If cCursorName contains data, the data imported from the XML file is appended to the existing data. If cCursorName is an empty string (""), the data from the XML file is imported into the table or cursor in the current work area. Setting nFlags to 8192 can be useful when an XML schema is not available or not practical for use. |
32768 | 0x8000 | Indicates that a code page should be used. |
65536 | 0x10000 | Maps XML Char fields to native Fox Varchar fields. If not specified, XML Char fields are mapped to Fox Character fields. |
131072 | 0x20000 | Maps XML base64Binary fields to native Fox Varbinary fields if less than 255 bytes or Blob fields if greater than this length. If not specified, XML base64Binary fields are mapped to Fox Memo fields. |
X# data type | Behavior |
---|---|
Character, Character (Binary), Memo, Memo (Binary) | Accepts any data but truncates any data exceeding the length of a Character column. |
Currency | Accepts numeric data within accepted range of the Currency type but truncates numbers outside this range. |
Date |
Accepts XML format date and dateTime values. X# converts the XML date and dateTime formats to the corresponding X# date. X# preserves only the M/D/Y portion of the XML date or dateTime value. |
DateTime | X# converts the XML date and dateTime formats to the corresponding X# date and discards precision beyond the extent supported by X#. |
Double | Accepts numeric data within the accepted range of the Double type but truncates numbers outside this range. |
Integer | Accepts integer data within the accepted range of the Integer type but truncates numbers outside this range. |
Logical | Accepts the values True, .T., 1, False, .F., and 0. |
Numeric, Float | Accepts numeric data with or without decimals but truncates numbers outside the accepted range for these types according to X# rules or replaces with the numeric overflow indicator ("*************"). |