Quantcast
Channel: My Errors & My Solutions
Viewing all articles
Browse latest Browse all 123

HOW TO load xml from a file in C/AL

$
0
0

My Errors & My Solutions
My Errors & My Solutions - It Could Happen To You

In the following example we are going to: open a file, create an InStream object, create an XmlDocument using the DotNet component and load the xml from the InStream.

This example requires that you create the following variables:

Name DataType Subtype
TestFile File
Istream InStream
XmlDoc DotNet
System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

HOW TO load xml from a file in C/AL?

TestFile.OPEN('C:\TestFolder\TestFile.xml');
TestFile.CREATEINSTREAM(Istream);

XmlDoc := XmlDoc.XmlDocument();
XmlDoc.Load(Istream);

Did my HOW TO help you? Leave a reply.

HOW TO load xml from a file in C/AL
Eclipses


Viewing all articles
Browse latest Browse all 123

Trending Articles