I am trying to extract the text content from IDML files.
What i am currently doing is -
Extract the xml files, go to
designmap.xml
file and look for the spreads that make up the document.Spreads are elements in designmap.xml, defined as ::
- In each spread, I look for
<TextFrame>
elements, and fetch the corresponding content from theParentStory
attribute
The problem is that this text does not seem to be in order. I have a simple IDML file, where i have one text frame for the title, and one textframe covers the contents of the page. When I extract, the body part ifs fetched first, and then the header.
Is there any way in which I can extract the content in the same order in which we can see it?
Thanks.
PS - In the element, the NextFrame and PreviousFrame attributes are both set to 'n'. I'm not sure what that means, and can these values somehow help. Apologies if I'm missing something very basic here, i'm new to in-design and IDML.