Skip to main content
Question

CDATA and XMLTemplater


Forum|alt.badge.img

Hi everyone, 

I use an XMLTemplater (FME Desktop 2015), where I want to add text that includes special characters. So I want to wrap <![CDATA[]]> around the text, when I add it to the String itself, it gets automatically resolved by fme. 

XML Templater:

<adv:localFlightRestrictions><![CDATA[@Value(localFlightRestrictions)]]></adv:localFlightRestrictions>

So the XML output does not contain the CDATA term, is it somehow possible to stop fme resolving the term itself, and write it to the xml as a simple string?

Thanks, best regards

Mel

6 replies

i have a same problem :'(


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • November 28, 2016

Just speculating, but if you have an attribute containing the CDATA wrapper, and then in the templater use {fme:get-xml-attribute("")} does the CDATA still get resolved?


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • November 28, 2016

Just piggy backing on the idea of @jdh, if you first concatenate the @Value(localFlightRestrictions) with ![CDATA[]] into a new attribute and insert that attribute into the XML?


fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • November 29, 2016

We have a PR (Problem Report) for this #52004 and also to allow the GML writer to include CDATA strings.


martinkoch
Supporter
Forum|alt.badge.img+18
  • Supporter
  • August 8, 2018
fmelizard wrote:

We have a PR (Problem Report) for this #52004 and also to allow the GML writer to include CDATA strings.

Has this issue been resolved yet? I am trying to force a <![CDATA[ ]]> part in an XML-templater output, and no matter what trickery I try, it refuses to do so.

 

 

I started out with FME 2015.1.2.1 but even 2018.1.0.1 seems to fail on this. Has the XML-templater had any love since 2015, as it is not listed as an upgradeable transformer?

 

 

b.t.w. using the StringReplacer to replace "<Mytag>" by "<Mytag><![CDATA[" adn "</Mytag>" by "]]></Mytag>" in the XMLTemplater output works, but is oh so very very ugly (and that is an understatement).

 

 


xiaomengatsafe
Safer
Forum|alt.badge.img+3
martinkoch wrote:
Has this issue been resolved yet? I am trying to force a <![CDATA[ ]]> part in an XML-templater output, and no matter what trickery I try, it refuses to do so.

 

 

I started out with FME 2015.1.2.1 but even 2018.1.0.1 seems to fail on this. Has the XML-templater had any love since 2015, as it is not listed as an upgradeable transformer?

 

 

b.t.w. using the StringReplacer to replace "<Mytag>" by "<Mytag><![CDATA[" adn "</Mytag>" by "]]></Mytag>" in the XMLTemplater output works, but is oh so very very ugly (and that is an understatement).

 

 

Hi @martinkoch, Thank you for adding your comment here. I've passed your comment to our dev team. We really appreciate your feedback.

 

Unfortunately this issue is not yet planned for the near future, partly because we haven't seen a lot of user interest in this feature.

 

To help improve its priority, would you consider Suggesting it as an IDEA? Please let us know how you'd like to use this feature, and what makes it important to you. This will allow others to vote, to add motivation behind adding this feature, and also ensure our developement team have a good understanding of your requirement. Thank you very much!

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings