XML Import Sample v1.0i
I got some e-mails with some question about how to import XML file into Navision. So here's a little codeunit with xml file that describes how to import a XML file into Navision. You'll need the 'Microsoft XML, version 2.0' which should be automatically available when installing Navision. At least all attain versions. This codeunit is written in Navision 3.70, but you can probably use it in version before that.
http://www.mibuso.com/dlinfo.asp?FileID=329
Discuss this download here.
Comments
with debugger in line:
MessageValues(XMLNode.attributes().getNamedItem('No.').text); // <Item No.=??????></Item>
thanks
The import is just a sample. This is made to show the programmer how to create a XML import.
It you want to import an XML file made by roman's(XE you will have to programm a import function especially for the file you created.
Hope to have helped!
If it was hard to write, it should be hard to understand."
I have tried to import a xml file, with your cu XML Import Sample but I cant get this to work with my xml file.
LoadNodeList(XMLDocument,XMLNodeList,'MEDL/MEDL');
It doesnt return anything.
Th bottom of the xml file looks like this
<KON>M</KON></MEDL></
NewDataSet></diffgr:diffgram><
/MedlemData></string>
The beginning looks like this
<string xmlns="http://tempuri.org/"><?xml version="1.0" encoding="utf-16"?>
<MedlemData><xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><xs:element name="NewDataSet"
msdata:IsDataSet="true" msdata:Locale="sv-SE"><xs:complexType><xs:choice maxOccurs="unbounded">
<xs:element name="MEDL"><xs:complexType><xs:sequence><xs
What have I done wrong?
(I have tried this also
LoadNodeList(XMLDocument,XMLNodeList,'MedlemData/MedlemData');
)
I dont have rights to run or read it and i hope i will be able to create one.
Christian
Why?
a) to conserve disk space
b) people with the same error can't use search to find your topic, as you can't search in images