String replace...bug - VisualCron - Forum

Community forum

hawkings
2010-04-20T08:32:17Z
If adding too many concurrent STRING-replace it simply returns a blank string.

The following example

{STRING(Replace,{STRING(Replace,{STRING(Replace,{STRING(Replace,{STRING(Replace,TestString1,Te,X)},s,X)},tS,X)},tr,X)},in,X)}

...should have returned XXXXXg, but returns blank.

If changed to:

{STRING(Replace,{STRING(Replace,{STRING(Replace,{STRING(Replace,TestString1,Te,X)},s,X)},tS,X)},tr,X)}

...then it correctly returns XXXXing


It's a specific problem since I have a XML file that needs to be stripped of namespaces before writing to a file (since Visualcron still doesn't handle XML namespaces 🙂 ). Unfortunately this XML file contains 5 different namespaces, and so I need to use 5 concurrent STRING-replace operations.

I run VC 5.5.3

Best regards,
René
ErikC
2010-04-20T10:04:23Z
You can try using the | as a delimiter in stead of the ,

{STRING(Replace|xxxxx|xxx|xxx)}
Uses Visualcron since 2006.
Support
2010-04-20T10:38:57Z
At the moment, for performance, VisualCron only goes 4 levels of Variables down.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-04-20T10:42:50Z
Ok, you can do it in two steps. Use a temp variable in the 1st step and parse it to a string (checkbox: translate to constant when running). In the 2nd step use this temp variable again and to the next replacements.
Because of the parsing in the 1st step you do not have 5 levels deep anymore.

Regards,
Erik
Uses Visualcron since 2006.
Support
2010-04-20T10:45:53Z
Btw, what do you mean here, on what level and how?

Quote:


It's a specific problem since I have a XML file that needs to be stripped of namespaces before writing to a file (since Visualcron still doesn't handle XML namespaces 🙂 ). Unfortunately this XML file contains 5 different namespaces, and so I need to use 5 concurrent STRING-replace operations.


Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hawkings
2010-04-20T11:03:52Z
Thanks for the clarification on the limits.

Regarding reading a node in an XML file, then I get a namespace error if the XML file contains namespace tags, like: <ns1:donkeymonkey>. ...so I need to strip the XML for namespace tags.

Currently I run 5.5.3, but this was still a bug in 5.5.5 before downgrading due to FTP errors.

Best regards
Support
2010-04-20T11:06:16Z
I am quite sure that this is fixed in later version. Could you send us the file you are trying to read?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hawkings
2010-04-20T11:17:25Z
Scroll to Top