Reputation: 4655
I'm working on a script for InDesign, and I'm pulling in content from an xml file. How would I parse and create the separate paragraphs in xml like this:
...
<body>
<p>this is a paragraph</p>
<p>this is another paragraph</p>
<u>This is underlined text</u>
</body>
....
I'm accessing the data with xml.body
using the XML class (EX4?). Would I have to create some sort of custom parser for this to create different paragraphs? Should I be storing this as CData?
Upvotes: 0
Views: 633
Reputation: 1391
Try using xslt when importing the xml file into the InDesign, to transform into elements what you need.
On the other hand, in InDesign xml structure the paragraphs does not have to be tagged as <p>. You can use any xml element, apply style to it and place it on the page.
Upvotes: 1