hi i try with some to create a XML file in ax through code.and i got successed.then again i try to read that xml it is not getting any error but output not comming.
static void XMLReadVendorList(Args _args)
{
XMLDocument doc;
XMLNode
rootNode,NodeVend,NodeName,NodeAddr,NodeCurrency,NodeCredit,NodeAmount
,NodeTransDate,NodeDueDate;
XMLParseError xmlError;
int i;
// Read the XML Document
doc = new XMLDocument();
//doc.async(FALSE);
doc.load(“C:\VendorList.xml”);
// Verify Document Structure
xmlError = doc.parseError();
if(xmlError && xmlError.errorCode() != 0)
{
throw error(strFmt(“Error: %1”,xmlError.reason()));
}
// Parsing document contents
rootNode = doc.documentElement();
// Get all Vendor information from XML document tags (and remove
it)
NodeVend = rootNode.selectSingleNode("//Vendor");
NodeName = rootNode.selectSingleNode("//VendName");
NodeAddr = rootNode.selectSingleNode("//VendAddr");
NodeCurrency = rootNode.selectSingleNode("//VendCurr");
NodeCredit = rootNode.selectSingleNode("//VendCredit");
NodeAmount = rootNode.selectSingleNode("//VendAmountCurr");
NodeTransDate = rootNode.selectSingleNode("//VendTransDate");
NodeDueDate = rootNode.selectSingleNode("//VendDueDate");
// From here you can use the retrieved information to insert the
data into a temporary table or
// process the data to obtain results
// Print gathered information from XML file
info(rootNode.text());
}