Automation creating XML file

I was almost successful to create a purchase order as XML file from within Fin 2.60, using “Microsoft XML automation 2.0”. The only thing I didn’t figure out how to create was the header-line with encoding and version. Such as:

<?xml version="1.0" encoding="ISO-8859-1"?>

I was expecting to find the appropriate methods with the DOMDocument object but wasn’t successful. Can anybody help? Additional question: Is there any documentation about the hyrarchy of the XML OCX available. Such as DOMDOCUMENT – IXMLDOMNodeList ---- IXMLDOMNode etc. ? ------- With best regards from Switzerland Marcus Fabian

I haven’t tested it yet, but will have a look at it this weekend… you can try with the XMLDocument object type better than DOMDocument for setting the version, charset and so… (look at the properties of that object ;)) :slight_smile: Regards from Spain – Alfonso Pertierra apertierra@teleline.es Spain

One thing to note is that theres a version 4 level of the MS XML dlls now. The basic ones are quite old. There is a dev kit just for v4 DLLs. Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu Email:cbradney@deloitte.com.au

Having upgraded from MS XML 2.0 to 3.0 type library the answer to my original question reads:


childNode := xmlDoc.createProcessingInstruction ('xml', 'version="1.0" encoding="ISO-8859-1"');
xmlDoc.appendChild (childNode);
childNode := xmlDoc.createProcessingInstruction ('xml-stylesheet', 'type="text/xsl" href='+
  '"myStylesheet.xslt"');
xmlDoc.appendChild (childNode); 

------- With best regards from Switzerland Marcus Fabian