Hi,
I have set up a workflow to read XML Sidecars associated with MXF files. The XML details create the path in which to deliver the transcoded file.
It appears to be having trouble with the character : being in the folder name. It strangely is fine creating files with : in the name - it appears to auto remove it, just not from folders.
Is there a way to ignore special characters when reading XML/creating folders?
For exmplae FFAStrans is reading this field in the XML to create a folder:
<pn1:Campaign_Title>Example Title: Promo</pn1:Campaign_Title>
Thanks
Creating Folder From XML Data - Special Characters
Re: Creating Folder From XML Data - Special Characters
Hey Graham,
so you already managed to construct the path to the xml files and read them successfully into a variable?
E.g. in a populate processor:
Also you already managed to extract the part of interest from the xml?
In that case, you have multiple options how to get rid of your ":" character. E.g. replace only the : character by _
or, and a much better option when reading filenames from metadata fields that are not intended to carry filenames, replace all potentially unsafe characters by _
All of the examples can be used in populate, but you don't write the left part %s_filename% = into the field but instead you select s_filename variable on the left side...
Does that make sense?
so you already managed to construct the path to the xml files and read them successfully into a variable?
E.g. in a populate processor:
Code: Select all
%s_xml_content% = $read("c:\temp\test.xml")
Code: Select all
%s_foldername% = $regext("%s_xml_content%","Campaign_Title>(.+?)<")
Code: Select all
%s_foldername% = $replace("%s_foldername%",":", "_", 1)
Code: Select all
%s_foldername% = $alrep("%s_foldername%","_")
Does that make sense?
emcodem, wrapping since 2009 you got the rhyme?
Re: Creating Folder From XML Data - Special Characters
Hi,
Yes - someone on this forum kindly helped me set up the reading of XML's previously.
The workflow goes something like this.
MXF > Hold (wait for XML) > Pop Variables (attached 1) > Encode to H264 > Deliver to Folder (attachment 2).
It's within the folder delivery I'm using the string %s_xml_campaign_title% from the reading of the xml. This sometimes contains : which is stopping the delivery.
My Pop variables for reading the xml don't quite look like what you've entered below.
Yes - someone on this forum kindly helped me set up the reading of XML's previously.
The workflow goes something like this.
MXF > Hold (wait for XML) > Pop Variables (attached 1) > Encode to H264 > Deliver to Folder (attachment 2).
It's within the folder delivery I'm using the string %s_xml_campaign_title% from the reading of the xml. This sometimes contains : which is stopping the delivery.
My Pop variables for reading the xml don't quite look like what you've entered below.
- Attachments
-
- 2.PNG (26.37 KiB) Viewed 2891 times
-
- 1.PNG (58.3 KiB) Viewed 2891 times
Re: Creating Folder From XML Data - Special Characters
Got it figured - working with the below screenshot. Thanks for the help!
Replaced the folder delivery path from %s_xml_campaign_title% with s_foldername also.
Thanks again
Michael
Replaced the folder delivery path from %s_xml_campaign_title% with s_foldername also.
Thanks again
Michael
- Attachments
-
- 3.PNG (71.07 KiB) Viewed 2880 times
Re: Creating Folder From XML Data - Special Characters
Well done, congrats
emcodem, wrapping since 2009 you got the rhyme?