3

是否有任何可以将图像粘贴到内容中的 IDE、XML 或纯文本或源代码编辑器?

通过粘贴我的意思是对Ctrl-V击键做出以下反应:

1)在代码文件的目录中创建一个图像文件并给它一个随机/顺序的名称

2) 将标签文本插入代码文件中,如<IMG href=""/>或编程语言读取指令,如 Java 的ImageIO.read.

这需要在为程序或数据库收集图像样本时尽量减少工作量。包括保存文件、为其命名、然后手动输入路径在内的传统方法包括许多不需要的击键。

二十一世纪需要更多的自动化!

Oxygen XML Editor 的功能很接近,但它并不好,并且仅限于少量的 XML 子格式。

如果此编辑器可以执行以下操作,那就太好了:

3) 将引用的文件名与实际文件名同步

4)渲染图像

更新

是否有任何传统的方式来处理 XML 中的图像?我知道我可以对其进行 uuencode 并插入。那么为什么 XML 编辑器不支持这个呢?

更新 2

Adobe Dreamweaver 允许将图像粘贴到 XML 中并插入标准 HTML<img>标签,但随后会失去标签和图像之间的连接,因此,例如,您无法重命名图像文件并更新标签。

4

1 回答 1

0

The most common way to handle images (or other large blocks of non-XML data) in XML is to use a URI to reference some location from which the application code can fetch the data as a separate document. The XHTML tag is a good example of this.

XML editors don't generally support uuencoding images because that is a much less common solution. It can certainly be done, if your application code knows to expect data in that form, but there isn't a lot of demand for it.

As far as maintaining the association between markup and external data... Generally, unless the tool has a move-external-data operation built into it, that's going to be your responsibility, just as it would be for HTML or other markup which references external data.

I can't advise you regarding tools since (a) picking a tool requires looking at exactly how well it interacts with the specific kinds of documents you want to process, and (b) I've generally just edited XML as text files with a bit of syntax-assist from Emacs or Eclipse, so I haven't investigated "XML editors" enough to have useful opinions on them.

于 2013-12-24T02:48:59.903 回答