【发布时间】:2015-06-18 19:46:18
【问题描述】:
在 Java 中使用 SAX Parser 时,我们将属性作为 startElement 方法中的参数之一。
谁能告诉我如何克隆这个属性,以便它可以存储在HashMap<String, Attributes>中。
【问题讨论】:
标签: java xml-parsing attributes sax saxparser
在 Java 中使用 SAX Parser 时,我们将属性作为 startElement 方法中的参数之一。
谁能告诉我如何克隆这个属性,以便它可以存储在HashMap<String, Attributes>中。
【问题讨论】:
标签: java xml-parsing attributes sax saxparser
new AttributesImpl(Attributes atts)
复制现有的 Attributes 对象。这个构造函数特别 在 startElement 事件中很有用。
【讨论】: