Simple XML export using .NET.

Hi Guys,

Could anyone tell me how to make a codeunit which can export a couple of fields from the customer table in XML but using the .NET xml variable called system.xml?

I am trying to understand how the basics of this works and would expect this could be done in a couple of lines of code…

Thank you!!! :-)

Thomas.

Why not use the XML port? Much easier! [:)]

Typically I’m using the XML ports for exports, but for imports, if just a bit advanced, then I’m coding the imports.

Erik, I absolutely agree! :slight_smile: Unfortunately my customer has bought a webshop where the NAV code is written in .NET…

Try this one:

http://blogs.msdn.com/b/nav/archive/2008/03/31/sample-of-how-to-write-a-simple-xml-document-using-msxml-dom-in-nav.aspx

Thanks Erik! Unfortunately, this appears to be with an Automation, not a .NET… :-/

I know, but for an experienced developer [;)] it’s rather easy to replace the one with the other.

Also if this codeunit needs to be in one “format”, because of a webshop where the NAV code is using .NET, then why not just do it the same way? Sorry for asking, but maybe I don’t quite understand what you’re trying to do and why.

Erik - OK, that sounds good! :slight_smile: In that case I will do the tutorial with the automation and then try to modify it to use the .net instead! :slight_smile:

Thanks!