Hello everyone
I'm checking in to see if anyone has come up with a way to modify or replace a CDATA section using the scripting API in Switch?
I'm able to retrieve the CDATA contents and modify the string data using string.replace, but I don't see any way to create and/or replace the CDATA elements in XML.
If there was only one iteration of a CDATA section, I'd happily SED it into position but there will be literally thousands per file.
Does anybody have any ideas?
Thanks in advance.
Create/modify CDATA section in XML files...?
Create/modify CDATA section in XML files...?
Regards,
William Buckingham
William Buckingham
-
- Member
- Posts: 93
- Joined: Fri Jul 08, 2011 10:31 am
- Location: The Netherlands
Re: Create/modify CDATA section in XML files...?
Currently the scripting API doesn't support CDATA
. The workaround would be to create/edit the xml and add the CDATA tags manually as "<![CDATA[content]]>" . After that, load the file as normal text-file, and do a search/replace.
A feature-request (ENFFR-1968) has been made to support CDATA.
![Crying or Very Sad :cry:](./images/smilies/icon_cry.gif)
A feature-request (ENFFR-1968) has been made to support CDATA.
Re: Create/modify CDATA section in XML files...?
Thanks for the reply and suggestions.
I'm exploring other options with the customer how to best handle this...hopefully we'll get that feature sometime in the not-to-distant future.
Thanks again.
I'm exploring other options with the customer how to best handle this...hopefully we'll get that feature sometime in the not-to-distant future.
Thanks again.
Regards,
William Buckingham
William Buckingham