// Do the text
for(XWPFRun run : paragraph.getRuns()) {
List<String> tags = new ArrayList<String>();
if(run instanceof XWPFHyperlinkRun) {
XWPFHyperlinkRun linkRun = (XWPFHyperlinkRun)run;
XWPFHyperlink link = linkRun.getHyperlink(document);
if(link != null && link.getURL() != null) {
xhtml.startElement("a", "href", link.getURL());
tags.add("a");
} else if(linkRun.getAnchor() != null && linkRun.getAnchor().length() > 0) {
xhtml.startElement("a", "href", "#" + linkRun.getAnchor());
tags.add("a");
}