类 WDocument
java.lang.Object
org.anyline.office.docx.entity.WDocument
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明org.dom4j.Element在element之后 插入节点 解析html有可能解析出多个element这里会返回最外层的最后一个org.dom4j.Elementorg.dom4j.Elementafter(org.dom4j.Element point, org.dom4j.Element element) org.dom4j.Element在element之前插入节点org.dom4j.Elementorg.dom4j.Elementbefore(org.dom4j.Element point, org.dom4j.Element element) org.dom4j.Elementblock(org.dom4j.Element parent, org.dom4j.Element prev, org.dom4j.Element element, Map<String, String> styles) voidflush()org.dom4j.ElementgetBody()static intindex(org.dom4j.Element parent, org.dom4j.Element element) org.dom4j.Elementorg.dom4j.Elementorg.dom4j.Elementinsert(int index, org.dom4j.Element parent, org.dom4j.Element element) org.dom4j.Elementorg.dom4j.Elementorg.dom4j.Elementorg.dom4j.Elementinsert(org.dom4j.Element parent, org.dom4j.Element element) voidinsertPageBreak(org.dom4j.Element prev) voidorg.dom4j.Elementp(org.dom4j.Element element) org.dom4j.Elementorg.dom4j.Elementorg.dom4j.Element获取书签所在的标签 通常用来定位org.dom4j.Elementorg.dom4j.ElementparseHtml(org.dom4j.Element parent, org.dom4j.Element prev, org.dom4j.Element html, Map<String, String> styles) org.dom4j.ElementparseHtml(org.dom4j.Element parent, org.dom4j.Element prev, org.dom4j.Element html, Map<String, String> styles, boolean copyPrevStyle) 解析htmlorg.dom4j.Elementpp(org.dom4j.Element element) 找到到当前p的上一级(用来创建与当前所在p平级的新p,遇到tc停止)org.dom4j.Elementorg.dom4j.ElementprevStyle(org.dom4j.Element prev) org.dom4j.Elementvoidreload()remove(org.dom4j.Element element) voidvoidsave()voidvoidsetBody(org.dom4j.Element body) voidvoidstyle(org.dom4j.Element element) org.dom4j.Elementtable(org.dom4j.Element box, org.dom4j.Element after, org.dom4j.Element src) tables()tables(boolean recursion) 获取doby下的tableorg.dom4j.Elementtc(org.dom4j.Element parent, org.anyline.entity.html.Td td) org.dom4j.Elementtr(org.dom4j.Element parent, org.anyline.entity.html.Tr tr)
-
字段详细资料
-
IS_HTML_ESCAPE
public boolean IS_HTML_ESCAPE
-
-
构造器详细资料
-
WDocument
-
WDocument
-
-
方法详细资料
-
getBody
public org.dom4j.Element getBody() -
setBody
public void setBody(org.dom4j.Element body) -
reload
public void reload() -
flush
public void flush() -
loadStyle
-
replace
-
before
在element之前插入节点- 参数:
element- elementhtml- html
-
before
public org.dom4j.Element before(org.dom4j.Element point, org.dom4j.Element element) -
before
-
after
public org.dom4j.Element after(org.dom4j.Element point, org.dom4j.Element element) -
after
-
after
在element之后 插入节点 解析html有可能解析出多个element这里会返回最外层的最后一个- 参数:
element- elementhtml- html- 返回:
- Element
-
insert
-
insert
-
insert
public org.dom4j.Element insert(org.dom4j.Element parent, org.dom4j.Element element) -
insert
-
insert
public org.dom4j.Element insert(int index, org.dom4j.Element parent, org.dom4j.Element element) -
insert
-
parent
获取书签所在的标签 通常用来定位- 参数:
bookmark- 书签tag- 上一级标签名 如tbl- 返回:
- Element
-
parent
-
table
-
tables
获取doby下的table- 参数:
recursion- 是否递归获取所有级别的table,正常情况下不需要,word中的tbl一般在body下的最顶级,除非有表格嵌套- 返回:
- tables
-
tables
-
setOrient
-
setOrient
-
insertPageBreak
public void insertPageBreak(org.dom4j.Element prev) -
index
public static int index(org.dom4j.Element parent, org.dom4j.Element element) -
pr
-
parent
-
pp
public org.dom4j.Element pp(org.dom4j.Element element) 找到到当前p的上一级(用来创建与当前所在p平级的新p,遇到tc停止)- 参数:
element- 当前节点- 返回:
- Element
-
p
public org.dom4j.Element p(org.dom4j.Element element) -
table
public org.dom4j.Element table(org.dom4j.Element box, org.dom4j.Element after, org.dom4j.Element src) -
tr
public org.dom4j.Element tr(org.dom4j.Element parent, org.anyline.entity.html.Tr tr) -
tc
public org.dom4j.Element tc(org.dom4j.Element parent, org.anyline.entity.html.Td td) -
prevStyle
public org.dom4j.Element prevStyle(org.dom4j.Element prev) -
block
-
parseHtml
public org.dom4j.Element parseHtml(org.dom4j.Element parent, org.dom4j.Element prev, org.dom4j.Element html, Map<String, String> styles, boolean copyPrevStyle) 解析html- 参数:
parent- 上一级prev- 放在prev之后html- htmlstyles- 样式copyPrevStyle- 是否复制前一个标签的样式,在替换书签时需要用到,但在div中嵌套的span需要避免复制闰一个标签的样式- 返回:
- prev
-
remove
-
remove
-
parseHtml
-
p
-
r
-
style
-
listStyle
-
insert
-
listStyles
-
save
public void save() -
save
-