Error When Create & Load MSXML DOM Document.

bestianhow
Member Posts: 120
Hi Experts,
I have encounter error during passing the Bigtext (XML Data) to a function
Please find attached the error.
Thanks.
I have encounter error during passing the Bigtext (XML Data) to a function
PassXMLData(VAR XMLData : BigText) ============================= IF CREATE(XMLDOMDoc) THEN BEGIN IF XMLDOMDoc.load(XMLData) THEN BEGIN MESSAGE('Loaded Successfully!'); END ELSE BEGIN MESSAGE('Load failed!'); END; END ELSE BEGIN MESSAGE('XML DOM Cannot be created!'); END;
Please find attached the error.
Thanks.
0
Comments
-
You cannot load bigtext into msxmldom
XMLDOMDoc.load(XMLData)
You need to change that
XMLData.createinstream(iStream);
XMLDOMDoc.load(iStream);0 -
Hi ara3n,
Thanks for reply.XMLData.createinstream(iStream);
XMLDOMDoc.load(iStream);
Base on your coding above, XMLData is BigText, so it cannot use createinstream.
Any idea?
Thank you.0 -
XMLData.read(Istream);0
-
Hi ara3n,
Loading XMLDoc with instream throws an error in RTC :
"streams cannot be used with client side invoked automation objects"
Is there any way can use a bigtext variable in RTC to load XML document ?0 -
why are you invoking the automation at client side?0
-
I have one another COM automation that i have to invoke on client side as it has some visual display .I am sending COM the XML Dom which i can invoke on server .But when i do that it says that client and server side cannot be mixed .So i have to use xml dom automation on client .Please suggest ,if it is possible using either instream or bigtext .Also if it is possible if i can send stream text only without any file drop .
Thanks !!0 -
You need to upload the blob as file to the client side int a temporary folder. then use
xmldom. load('LocationofTemoraryFile);0 -
Just try
XMLDOMDoc.loadxml(format(XMLData));
it works for me, but i don't know if there is any consequences using format for big text.
Thanks0 -
1. Try to use LoadXML method instead of Load.
2. Try pass XML data as variant.
Also, you can use 'Microsoft XML, v3.0'.IXMLDOMText' object instead of bigtext datatype (it's trick for older nav versions).
Here sample code:xmlResultNode:=xmlDoc.documentElement.selectSingleNode('./soap:Body/RelationshipsResponse/RelationshipsResult'); IF NOT ProcessResult(retVal) THEN EXIT(retVal); xmlDomText:=xmlContentNode.selectSingleNode('./text()'); CLEAR(lXmlDoc); CREATE(lXmlDoc); IF NOT lXmlDoc.loadXML(xmlDomText.nodeTypedValue) THEN EXIT(Err0001);
Looking for part-time work.
Nav, T-SQL.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