Nav XML Export CDATA

MrWho
Member Posts: 59
Hello!
I need some help finding out how I could get my xml document exported with a CDATA section with Nav XML Port. This is the result, I'm getting if I'm just adding <!CDATA[ + Text + ]]> in my code on OnBeforePassVariable in the XML Port.
I tried the MS XML Dom Automation - createCDATAsection, but probally I'm using it wrong, cause I'm trying to retrive only the value back, and then Nav crashes.. is this the only soloution? Any example on doing this?
I need some help finding out how I could get my xml document exported with a CDATA section with Nav XML Port. This is the result, I'm getting if I'm just adding <!CDATA[ + Text + ]]> in my code on OnBeforePassVariable in the XML Port.
<Description><![CDATA[ Hello, world ]]></Description>
I tried the MS XML Dom Automation - createCDATAsection, but probally I'm using it wrong, cause I'm trying to retrive only the value back, and then Nav crashes.. is this the only soloution? Any example on doing this?
0
Comments
-
I have a similar issue and was wondering if anyone had a solution. I am exporting an XMLport that will be picked up by another app. All the elements and data are coming from the NAV database, but I need to enclose the actual XMLport output in the CDATA term. So it's not just a single variable that needs to be enclosed, but part of the XML tree. Weird, I know, but that's what the destination app requires. We are running NAV 5.0.
<xml> <![CDATA[ <Item> <No.>ITEM-000001</No.> <Description>lorem ipsum</Description> </Item> ]]> </xml> Thanks! Jamison VanCleve
0 -
I don't think it's possible with xmlport alone, but you can use xmlport to create the xml file. store the data in temporary blob. pass the blob to MSxmldom and add the <![CDATA[ element .0
-
That's a good idea - I'll give it a try. Thanks ara3n!0
-
You may encounter problems with accessing the data in CData sections via the XML Dom as it's not actually parsed by the XML Engine.
When you use the createCDataSection did you follow that call up with an appendChild(<NewCDATANode>) call to the root XML document object?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