Page 1 of 1

Tags w:bookmarkStart & bookmarkEnd

PostPosted: Sun Apr 24, 2011 9:08 am
by smer4
it seems that a CTBookmark and CTBookmarkRange are something very different (another variables and i dont see the tags in xml strukture)
so hot to add this tags with docx4j?

as i try to parse it with
Code: Select all
String bookmarkStart =
         "<w:bookmarkStart w:id=\"0\" w:name=\"sampleBookmark\" />",
         bookmarkEnd = "<w:bookmarkEnd w:id=\"0\" />";
Object bStart = XmlUtils.unmarshalString(bookmarkStart);
      Object bEnd = XmlUtils.unmarshalString(bookmarkEnd);


i get
Code: Select all
The prefix "w" for element "w:bookmarkStart" is not bound.

the same 4 another of course .
Any help pls?

Re: Tags w:bookmarkStart & bookmarkEnd

PostPosted: Sun Apr 24, 2011 2:00 pm
by jason

Re: Tags w:bookmarkStart & bookmarkEnd

PostPosted: Thu Nov 03, 2016 9:00 pm
by Olivier
Hi,

the link is dead, please can you put an example ?

Thanks a lot

Re: Tags w:bookmarkStart & bookmarkEnd

PostPosted: Thu Nov 03, 2016 9:27 pm
by jason
https://github.com/plutext/docx4j/blob/ ... rkAdd.java

If you navigate to the parent dir, you'll see a couple of other bookmark related samples.