How to handle a large file returned from automation

jensthomsen
Member Posts: 173
Hi There
(My second post today
)
I'm calling an automation from within navision. The automation will return a XML-document:
ReturnValue := AutomationCall(Argument1,Argument2)
How can I handle the returnvalue? The encoding of the received XML-document isn't the problem! But how can I save the Returnvalue for "later use"??
Jens
(My second post today

I'm calling an automation from within navision. The automation will return a XML-document:
ReturnValue := AutomationCall(Argument1,Argument2)
How can I handle the returnvalue? The encoding of the received XML-document isn't the problem! But how can I save the Returnvalue for "later use"??
Jens
0
Comments
-
You can save the xml in a blob field, or you can parse the xml file and store it a table.0
-
Hi Rasheed (you again:-))
I'm not so familiar working with Blobs or "parsing"! Could you give me some hints?
What if the size of the XML exceeds the "capacity" of a Blob (=4Gb i guess)? The best thing to do, I think, would be to save/parse the XML to a file on the disc, and handle it from there?? Any clue of how to do that?
Jens0 -
Hello Jens
4 Gb is a lot of space. The size of 5 CD. That's a lot of space. You will never see an xml file of that size. Plus the file gets compressed in the blob.
The following code creates an xml file.IF NOT CREATE(XMLDOMDocument) THEN ERROR('could not create the xml DOM object'); // Get the current Node CurrNode := XMLDOMDocument.createElement('String'); CurrNode.text := 'Hello World'; XMLDOMDocument.documentElement := CurrNode; XMLDOMDocument.save('c:\answer.xml'); END;
This is how the xml file look like<?xml version="1.0" ?> <String> Hello World </String>
The following code will save into the Item.Picture field which is a blob field.Item.Get('1000'); Item.Picture.IMPORT('c:\answer.xml',false); Item.modify(true);
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions