Hi,
I am using Aspose Words for java.I have a document with two sections having header in both. I am taking the header nodes from the document using the code
NodeCollection headFootNodes = doc.getChildNodes(NodeType.HEADER_FOOTER, true);
for (int hfCount = 0; hfCount < headFootNodes.getCount(); hfCount++)
{
HeaderFooter headFoot = (HeaderFooter)headFootNodes.get(hfCount);
if (headFoot.getStoryType() == StoryType.PRIMARY_HEADER || headFoot.getStoryType() == StoryType.EVEN_PAGES_HEADER || headFoot.getStoryType() == StoryType.FIRST_PAGE_HEADER)
{
System.out.println(headFoot.getStoryType());
}//if
}//for
I am getting the second section’s header as first node and first sections header as second.Is this usual? I need to process the headers in order(firstpage->even_page).How to do that?