how can I get the Header.xml And Footer.xml...
Posted: Thu Nov 05, 2009 11:39 am
hi all,
exactly I want to get the header's content from the value of the r:id which I can get through the CTRel object.
the code of the test:
but I don't know how to use the Part object to get the content.
useing the code, can I get the xml content??
how shall I do the next ...
exactly I want to get the header's content from the value of the r:id which I can get through the CTRel object.
the code of the test:
- Code: Select all
public static void main(String[] args) throws Docx4JException {
File file = new File("K:\\word\\headerTest1.docx");
WordprocessingMLPackage wmlpackage = null;
wmlpackage = WordprocessingMLPackage.load(file);
MainDocumentPart mdp = wmlpackage.getMainDocumentPart();
Part part = mdp.getRelationshipsPart().getPart("rId6");
...
...
...
}
but I don't know how to use the Part object to get the content.
useing the code, can I get the xml content??
how shall I do the next ...