Loads an XML document from a file. You have to pass the absolute filename. If you want to load XML documents from files in the data section, use GetDataFilePath to get the absolute filename.
XmlAPI.bdh
XmlCreateDocumentFromFile( in sFilename : string ): number;
document handle if successful
0 otherwise
Parameter | Description |
---|---|
sFilename | Filename of the XML file that should be loaded! |
dcltrans transaction TMain var hDocument, hOrderItem : number; sAttrValue : string; begin hDocument := XmlCreateDocumentFromFile("C:\\MyXMLDocuments\\Order.xml"); hOrderItem := XmlSelectSingleNode(hDocument, "//OrderItem[1]"); XmlGetAttributeByName(hOrderItem, "price", sAttrValue); end TMain;