Page 1 of 1
find all bookmarks and set value

Posted:
Wed Jan 25, 2012 8:26 am
by fwu
Hello,
can someone tellme the best way to find all bookmarks ina document and set its values?
thank you
fwu
Re: find all bookmarks and set value

Posted:
Wed Jan 25, 2012 10:43 am
by jason
By "set its values" you mean replace the contents of the bookmark?
You can find bookmarks using TraversalUtils or XPath.
Altering the contents depends a bit on where the bookmark starts and finishes, but assuming the start and end is in a single paragraph, it is just a matter of replacing content in that paragraph's content list.
Re: find all bookmarks and set value

Posted:
Thu Jan 26, 2012 2:31 am
by fwu
hello jason,
thank you for your reply.
Where can I find an example of that?
thank you
fwu
Re: find all bookmarks and set value

Posted:
Thu Jan 26, 2012 10:34 am
by jason
See the Getting Started guide, that should help.