XMLPORT Special character with CDATA

kenjes
Member Posts: 76
Hi,
I need a CDATA TAG like this from a XMLport :
<Text><[CDATA[This Is my Cdata text bla bla bla bla]]></Text>
NOT :
<Text><[CDATA[This Is my Cdata text bla bla bla bla]]></Text>
My xmlport replaces < and >
Thanks ..
/Kenneth
I need a CDATA TAG like this from a XMLport :
<Text><[CDATA[This Is my Cdata text bla bla bla bla]]></Text>
NOT :
<Text><[CDATA[This Is my Cdata text bla bla bla bla]]></Text>
My xmlport replaces < and >
Thanks ..
/Kenneth
0
Answers
-
0
-
Hi
That's the one I have used//>Descriptions CLEAR(LongDescr); CR[1] := 13; LF[1] := 10; Item.CALCFIELDS(WebTextDK); Item.WebTextDK.CREATEINSTREAM(Istream); LongDescr.READ(Istream); CLEAR(LongDescription); IF LongDescr.LENGTH > 0 THEN BEGIN LongDescription.ADDTEXT('<![CDATA['+CR+LF); LongDescription.ADDTEXT(LongDescr); LongDescription.ADDTEXT(CR+LF+']]>'); END;
And it gives med this :
<LongDescription><![CDATA[
Æske m. låg i sæt af 3 Bruges til dekoration eller som opbevaring af kontorartikler eller mindre legetøj og nips
]]></LongDescription>
With the <! and >
The XMLPORT that replaces the <>
0 -
Hi again
I can see the this site convert the character I tried to write back to <><LongDescription><![CDATA[ Æske m. låg i sæt af 3 Bruges til dekoration eller som opbevaring af kontorartikler eller mindre legetøj og nips ]]></LongDescription>
0 -
Hi
I have solved it with a little dotnet.
First I export the XML file with <LongDescription> as a normal text. (BIGTEXT)
Then when file is closed I use this code :Xml := Xml.XmlDocument(); Xml.Load('C:\TEMP\Products.xml'); XMLRootNode := Xml.DocumentElement; FOREACH XmlNode IN XMLRootNode.SelectNodes('/root/Products/Product/LongDescription') DO BEGIN innertext := XmlNode.InnerText; IF innertext <> '' THEN BEGIN newCDATA := XmlNode.OwnerDocument.CreateCDataSection(innertext); XmlNode.InnerText := ''; XmlNode.AppendChild(newCDATA); END; END;
Variables defined :
Xml DotNet System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
XmlNode DotNet System.Xml.XmlNode.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
XMLRootNode DotNet System.Xml.XmlNode.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
innertext Text
newCDATA DotNet System.Xml.XmlCDataSection.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
My solution,
I anyone runs into same issue.
Thanks.
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