xml dom

guptashikha9
Member Posts: 5
hi
i am unable to create an instream object with the blob.
I am using the XmlDom Document automation.
it is giving me the error:
'This automation variable has not been instantiated .You can do it by either creating it or assigning it.'
shikha
i am unable to create an instream object with the blob.
I am using the XmlDom Document automation.
it is giving me the error:
'This automation variable has not been instantiated .You can do it by either creating it or assigning it.'
shikha
0
Comments
-
I'm using this code:
IF NOT CREATE(XMLDoc) THEN ERROR('No automation'); MyRec.CALCFIELDS("XML File"); MyRec."XML File".CREATEINSTREAM(InStream); IF NOT XMLDoc.load(InStream) THEN BEGIN CLEAR(XMLDoc); ERROR('No valid XML'); END;
How is your code or did the above help?Regards
Peter0 -
thanks for your reply.
The xmldom is being created however,
as i write the following code,
xmlDom.load();
the same error appears.
Actually i want to save some files in navision database and am looking for a solution.0 -
how do you want to save the files in navision ? from the file system ? then try Field.IMPORT(<filename>) of the BLOB-Field and insert the record.
If you want to parse the content of a BLOB with a DOMDocument try this:
IF BLOBField.HASVALUE THEN BEGIN
BLOBField.CreateINSTREAM(instream);
IF DOMDocument.load(instream) THEN BEGIN
<...>
END;
END;
this works inside the table where the blob-field is placed, but maybe you need a calcfields on the blobfield befor you create the instream ?0 -
The XMLDOM is not created by the Load method. You will have to explicitly create the object before you can load it. So you will need to do this:
IF ISCLEAR(MSDOM) THEN CREATE(MSDOM); MSDOM.Load(YourXmlHere);
hth0
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