I'm a designer and know very little about scripting or XML, but here goes. I have some XML files I'm formatting for print, and they don't have paragraph returns where they need to be. The returns always need to be before a specific XML tag (that I can change to a specific character style to make it easier to find...). But I don't see a way to do this using the usual InDesign Find/Replace tools, so I assume scripting is going to be the answer. Anyone know how to accomplish this?
Here's an example of the content I'm working with. The breaks need to happen BEFORE each <City> element. I'm using InDesign CS6 on a Mac.
<?xml version="1.0" encoding="UTF-8"?>
BIG BEND COUNTRY<City>
<City_Name>ALPINE
</City_Name><Event_Name>
Big Bend Ranch Rodeo </Event_Name>
<Date>August 8-9
</Date><Venue_Name>
Sul Ross State University S.A.L.E. Arena</Venue_Name>
<Website1>www.bigbendranchrodeo.com
</Website1><Phone1>
4323642696</Phone1>
<Phone2></Phone2>
</City><City>
<City_Name>ALPINE
</City_Name><Event_Name>
Big Bend Balloon Bash </Event_Name>
<Date>August 30-September 1
</Date><Venue_Name>
Alpine-Casparis Municipal Airport</Venue_Name>
<Website1>bigbendballoonbash.com
</Website1><Phone1>
4328377486</Phone1>
<Phone2></Phone2>
</City><City>
<City_Name>EL PASO
</City_Name><Event_Name>
Alfresco! Fridays </Event_Name>
<Date>August 1, 8, 15, 22, 29
</Date><Venue_Name>
Convention Center Plaza</Venue_Name>
<Website1>www.alfrescofridays.com
</Website1><Phone1>
915/534-0600</Phone1>
<Phone2/></City>
Thanks in advance!