XML Import Sample v1.0i

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2012-03-13 in Download section
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

  • visperasvisperas Member Posts: 31
    hi, i use the roman's(XE 1.3i module for export one product, i try import with this module and crash.
    with debugger in line:

    MessageValues(XMLNode.attributes().getNamedItem('No.').text); // <Item No.=??????></Item>

    thanks
  • eromeineromein Member Posts: 589
    Thoses two pieces of application are not compatible...

    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!
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • antiloopantiloop Member Posts: 10
    Hello!

    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&quot;
    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');
    :cry: )
  • dagodago Member Posts: 22
    can somebody post the content of codeunit XML Import Sample ?
    I dont have rights to run or read it and i hope i will be able to create one.
  • Christian_WandborgChristian_Wandborg Member Posts: 23
    edited 2012-03-13
    Post deleted
    Regards
    Christian
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    Don't use an image attachment to display your error message. In NAV, you can use Ctrl-C on a error message, to capture the error in text format, so you can paste that in your posting.

    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
Sign In or Register to comment.