将 XML 导入 Google 文档(不是电子表格)
我有一个 XML 文件。我希望能够导入 Google 文档(最终另存为 .doc)。是否可以将 XML 文件导入 Google 文档?
假设我可以将其拉入谷歌文档,有没有办法创建一个宏,使父节点成为 Header1 ,子节点成为用蓝色斜体写的项目符号?即我希望宏能够将 XML 文件呈现为一种漂亮的文档格式,
我环顾四周,我似乎只能找到将 XML 导入到 google 电子表格的参考,这不是我在这里所追求的。
I have an XML file. I would like to be able to pull into into a Google Document (to eventually save as .doc). Is it possible to import an XML file into a Google Document?
Assuming I can pull it into google Doc, is there a way to create a Macro such that the parent nodes become Header1 and the children become bullets written in blue italics for example? i.e. I would like the macro to be able to render the XML file into a nice document looking format
I have looked around and I only seem to be able to find reference for XML imports into a google spreadsheet which is not what I am after here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定这是否是您正在寻找的内容,但从 Office 2007(我认为)开始,Excel 电子表格和 Word 文档(以及我认为所有 Office 系列文档)都有 XML 格式。
有关此内容的一些信息可以在此处。
当我想从 XML 生成 Excel 工作表时,我自己就遇到了这个问题;我的方法是使用 XML 格式保存一个类似于我希望输出在 Excel 中的文档,然后在 XML 编辑器中打开该 XML。
一旦您知道新的 XML 需要是什么样子;您可以编写通用的 XSLT(取决于 XML 文档和模板的复杂程度)来转换为 Office 格式。
因此,考虑到您的问题,我会将其转换为 Word 格式,并将其导入到 Google 文档中。
Not sure if this is what you're looking for, but as of Office 2007 (I think), there are XML formats for Excel spreadsheets and Word documents (and, I think, all the Office family documents).
Some info about this can be found here.
I came across it myself when wanting to generate Excel sheets from XML; my method was to save a document that looked like what I wanted my output to be in Excel using the XML format, then open the XML in an XML Editor.
Once you know what your new XML needs to look like; you can write a general XSLT (depending on how complex your XML documents and your template are) to convert into Office format.
So, given your problem, I'd convert to Word format, and import that into Google Docs.