Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by saveOptions.setImages Folder
使用Java将word解析出来,包含格式和图片_java读取word带格式_未婚男子王某的博客-CSDN博客
1、需求: a. 将word中的内容按照层级结构解析出来 b. 不区分文件的后缀 c. 包含word的样式 2、思路:总体思路分为存和取,存的是文档的标题和内容、图片等;取的是文档的树形结构。 (1). 存:将word中的标题、内容、图片获取出来并进行存储 a. 上传文档时,获取到文档的名称,存储到数据库表中,产生一个id,即documentId b. 解析word之后,按照顺序遍历获取每一个标题进行存储,父标题和子标题之间使用parentId进行关联,即子标题中字段parentId是父标题的id c. 在所有的标题中都添加一个documentId方便后期范围查询 d. 根节点即一级标题的父id为0 e. 查到的内容如果是p标签,则与自己的上一级进行关联,即p标签的父id为它的上一级标签id f. 关联完成之后,生成一个树形结构,并遍历存储到第三方平台的数据库中。 (2). 取:根据documentId查询该文档的树形结构并返回 a. 根据documentId查询该文档的所有标题并存储到集合中去 b.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with saveOptions.setImages
Contact saveOptions.setImages, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack