Storing XML as a Blob and presenting/printing it.

Kylea
Member Posts: 39
Hi all,
OK I am sure I read somewhere in here about storing xml as a Blob and I am sure there was a beautiful example of the code but alas I can not find it again.
I am using V3.70 SQL and intend on storing a received xml response as xml in a blob field and then I am thinking of using the DocDom to somehow display the xml on screen so the user can either print or just view the formatted xml information.
Has anyone done this successfully?
Kylea.
OK I am sure I read somewhere in here about storing xml as a Blob and I am sure there was a beautiful example of the code but alas I can not find it again.
I am using V3.70 SQL and intend on storing a received xml response as xml in a blob field and then I am thinking of using the DocDom to somehow display the xml on screen so the user can either print or just view the formatted xml information.
Has anyone done this successfully?
Kylea.
0
Comments
-
Hi Kylea,
i'm going thru the same process/problem.
any suggestions?
thanxs a lot0 -
Try this (may contain some typos)
Import XML to Blob://xmlDoc 'Microsoft XML, v3.0'.DOMDocument30 //xmlOutStream OutStream myTable."XML File".CREATEOUTSTREAM(xmlOutStream); xmlDoc.save(xmlOutStream); myTable.MODIFY;
Export XML from Blob and Show in Browser://xmlDomDoc 'Microsoft XML, v3.0'.DOMDocument30 //xmlInStream InStream TempFilename := 'c:\temp\test.xml'; CALCFIELDS("XML File"); IF myTable."XML File".HASVALUE THEN BEGIN // Stream XML out of Blob, show in Browser myTable."XML File".CREATEINSTREAM(xmlInStream); CREATE(xmlDomDoc); xmlDomDoc.load(xmlInStream); xmlDomDoc.save(TempFilename); HYPERLINK(TempFilename); END;
0 -
OK thanks but let me explain a little further.
We actually are using our own dll to place a request on a website and then receive a response (property).
i.e. MyControl = Automation
So the code goes something like this.
MyControl.Request(request);
Then we want the Response which is a property that is passed back into the dll --- but I am not sure how to get it back into Navision.
So what I really want to do is something like this where
ResponseRec = Table
XMLResponseReport = Blob in ResponseRec
XmlOutStream = OutStream
I can do this to collect the Response using the dll.
MyContorl.Response(Response);
but I don't know how to get the Property 'Response' back into my table.
I know this is incorrect code but I am just not sure how to get the property response into the Stream so I can save it in my blob field.
ResponseRec.XMLResponseReport.CREATEOUTSTREAM(XmlOutStream);
ResponseRec.Response.save(xmlOutStream);
How can you return a property from a dll into a Navision blob?
Kylea. ](*,)0 -
ha5 Thanx a Lot!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