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 VanCleve0 -
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 <