forked from pool/nanoxml
required for Jameica OBS-URL: https://build.opensuse.org/request/show/407431 OBS-URL: https://build.opensuse.org/package/show/Java:packages/nanoxml?expand=0&rev=1
251 lines
11 KiB
Diff
251 lines
11 KiB
Diff
--- Sources/Java/net/n3/nanoxml/NonValidator.java
|
|
+++ Sources/Java/net/n3/nanoxml/NonValidator.java
|
|
@@ -587,10 +587,10 @@
|
|
int lineNr)
|
|
{
|
|
Properties props = (Properties) this.currentElements.pop();
|
|
- Enumeration enum = props.keys();
|
|
+ Enumeration enum2 = props.keys();
|
|
|
|
- while (enum.hasMoreElements()) {
|
|
- String key = (String) enum.nextElement();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ String key = (String) enum2.nextElement();
|
|
extraAttributes.put(key, props.get(key));
|
|
}
|
|
}
|
|
--- Sources/Java/net/n3/nanoxml/StdXMLParser.java
|
|
+++ Sources/Java/net/n3/nanoxml/StdXMLParser.java
|
|
@@ -492,10 +492,10 @@
|
|
extraAttributes,
|
|
this.reader.getSystemID(),
|
|
this.reader.getLineNr());
|
|
- Enumeration enum = extraAttributes.keys();
|
|
+ Enumeration enum2 = extraAttributes.keys();
|
|
|
|
- while (enum.hasMoreElements()) {
|
|
- String key = (String) enum.nextElement();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ String key = (String) enum2.nextElement();
|
|
String value = extraAttributes.getProperty(key);
|
|
attrNames.addElement(key);
|
|
attrValues.addElement(value);
|
|
--- Sources/Java/net/n3/nanoxml/XMLElement.java
|
|
+++ Sources/Java/net/n3/nanoxml/XMLElement.java
|
|
@@ -484,9 +484,9 @@
|
|
* @return the child element, or null if no such child was found.
|
|
*/
|
|
public IXMLElement getFirstChildNamed(String name) {
|
|
- Enumeration enum = this.children.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- IXMLElement child = (IXMLElement) enum.nextElement();
|
|
+ Enumeration enum2 = this.children.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ IXMLElement child = (IXMLElement) enum2.nextElement();
|
|
String childName = child.getFullName();
|
|
if ((childName != null) && childName.equals(name)) {
|
|
return child;
|
|
@@ -506,9 +506,9 @@
|
|
*/
|
|
public IXMLElement getFirstChildNamed(String name,
|
|
String namespace) {
|
|
- Enumeration enum = this.children.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- IXMLElement child = (IXMLElement) enum.nextElement();
|
|
+ Enumeration enum2 = this.children.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ IXMLElement child = (IXMLElement) enum2.nextElement();
|
|
String str = child.getName();
|
|
boolean found = (str != null) && (str.equals(name));
|
|
str = child.getNamespace();
|
|
@@ -534,9 +534,9 @@
|
|
*/
|
|
public Vector getChildrenNamed(String name) {
|
|
Vector result = new Vector(this.children.size());
|
|
- Enumeration enum = this.children.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- IXMLElement child = (IXMLElement) enum.nextElement();
|
|
+ Enumeration enum2 = this.children.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ IXMLElement child = (IXMLElement) enum2.nextElement();
|
|
String childName = child.getFullName();
|
|
if ((childName != null) && childName.equals(name)) {
|
|
result.addElement(child);
|
|
@@ -557,9 +557,9 @@
|
|
public Vector getChildrenNamed(String name,
|
|
String namespace) {
|
|
Vector result = new Vector(this.children.size());
|
|
- Enumeration enum = this.children.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- IXMLElement child = (IXMLElement) enum.nextElement();
|
|
+ Enumeration enum2 = this.children.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ IXMLElement child = (IXMLElement) enum2.nextElement();
|
|
String str = child.getName();
|
|
boolean found = (str != null) && (str.equals(name));
|
|
str = child.getNamespace();
|
|
@@ -585,9 +585,9 @@
|
|
* @return the attribute, or null if the attribute does not exist.
|
|
*/
|
|
private XMLAttribute findAttribute(String fullName) {
|
|
- Enumeration enum = this.attributes.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- XMLAttribute attr = (XMLAttribute) enum.nextElement();
|
|
+ Enumeration enum2 = this.attributes.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ XMLAttribute attr = (XMLAttribute) enum2.nextElement();
|
|
if (attr.getFullName().equals(fullName)) {
|
|
return attr;
|
|
}
|
|
@@ -606,9 +606,9 @@
|
|
*/
|
|
private XMLAttribute findAttribute(String name,
|
|
String namespace) {
|
|
- Enumeration enum = this.attributes.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- XMLAttribute attr = (XMLAttribute) enum.nextElement();
|
|
+ Enumeration enum2 = this.attributes.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ XMLAttribute attr = (XMLAttribute) enum2.nextElement();
|
|
boolean found = attr.getName().equals(name);
|
|
if (namespace == null) {
|
|
found &= (attr.getNamespace() == null);
|
|
@@ -860,9 +860,9 @@
|
|
*/
|
|
public Enumeration enumerateAttributeNames() {
|
|
Vector result = new Vector();
|
|
- Enumeration enum = this.attributes.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- XMLAttribute attr = (XMLAttribute) enum.nextElement();
|
|
+ Enumeration enum2 = this.attributes.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ XMLAttribute attr = (XMLAttribute) enum2.nextElement();
|
|
result.addElement(attr.getFullName());
|
|
}
|
|
return result.elements();
|
|
@@ -897,9 +897,9 @@
|
|
*/
|
|
public Properties getAttributes() {
|
|
Properties result = new Properties();
|
|
- Enumeration enum = this.attributes.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- XMLAttribute attr = (XMLAttribute) enum.nextElement();
|
|
+ Enumeration enum2 = this.attributes.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ XMLAttribute attr = (XMLAttribute) enum2.nextElement();
|
|
result.put(attr.getFullName(), attr.getValue());
|
|
}
|
|
return result;
|
|
@@ -915,9 +915,9 @@
|
|
*/
|
|
public Properties getAttributesInNamespace(String namespace) {
|
|
Properties result = new Properties();
|
|
- Enumeration enum = this.attributes.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- XMLAttribute attr = (XMLAttribute) enum.nextElement();
|
|
+ Enumeration enum2 = this.attributes.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ XMLAttribute attr = (XMLAttribute) enum2.nextElement();
|
|
if (namespace == null) {
|
|
if (attr.getNamespace() == null) {
|
|
result.put(attr.getName(), attr.getValue());
|
|
@@ -1007,9 +1007,9 @@
|
|
if (this.attributes.size() != elt.getAttributeCount()) {
|
|
return false;
|
|
}
|
|
- Enumeration enum = this.attributes.elements();
|
|
- while (enum.hasMoreElements()) {
|
|
- XMLAttribute attr = (XMLAttribute) enum.nextElement();
|
|
+ Enumeration enum2 = this.attributes.elements();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ XMLAttribute attr = (XMLAttribute) enum2.nextElement();
|
|
if (! elt.hasAttribute(attr.getName(), attr.getNamespace())) {
|
|
return false;
|
|
}
|
|
--- Sources/Java/net/n3/nanoxml/XMLWriter.java
|
|
+++ Sources/Java/net/n3/nanoxml/XMLWriter.java
|
|
@@ -182,10 +182,10 @@
|
|
}
|
|
}
|
|
|
|
- Enumeration enum = xml.enumerateAttributeNames();
|
|
+ Enumeration enum2 = xml.enumerateAttributeNames();
|
|
|
|
- while (enum.hasMoreElements()) {
|
|
- String key = (String) enum.nextElement();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ String key = (String) enum2.nextElement();
|
|
int index = key.indexOf(':');
|
|
|
|
if (index >= 0) {
|
|
@@ -203,10 +203,10 @@
|
|
}
|
|
}
|
|
|
|
- enum = xml.enumerateAttributeNames();
|
|
+ enum2 = xml.enumerateAttributeNames();
|
|
|
|
- while (enum.hasMoreElements()) {
|
|
- String key = (String) enum.nextElement();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ String key = (String) enum2.nextElement();
|
|
String value = xml.getAttribute(key, null);
|
|
this.writer.print(" " + key + "=\"");
|
|
this.writeEncoded(value);
|
|
@@ -229,10 +229,10 @@
|
|
writer.println();
|
|
}
|
|
|
|
- enum = xml.enumerateChildren();
|
|
+ enum2 = xml.enumerateChildren();
|
|
|
|
- while (enum.hasMoreElements()) {
|
|
- IXMLElement child = (IXMLElement) enum.nextElement();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ IXMLElement child = (IXMLElement) enum2.nextElement();
|
|
this.write(child, prettyPrint, indent + 4,
|
|
collapseEmptyElements);
|
|
}
|
|
--- Sources/Lite/nanoxml/XMLElement.java
|
|
+++ Sources/Lite/nanoxml/XMLElement.java
|
|
@@ -478,9 +478,9 @@
|
|
this.children = new Vector();
|
|
this.entities = entities;
|
|
this.lineNr = 0;
|
|
- Enumeration enum = this.entities.keys();
|
|
- while (enum.hasMoreElements()) {
|
|
- Object key = enum.nextElement();
|
|
+ Enumeration enum2 = this.entities.keys();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ Object key = enum2.nextElement();
|
|
Object value = this.entities.get(key);
|
|
if (value instanceof String) {
|
|
value = ((String) value).toCharArray();
|
|
@@ -2168,10 +2168,10 @@
|
|
writer.write('<');
|
|
writer.write(this.name);
|
|
if (! this.attributes.isEmpty()) {
|
|
- Enumeration enum = this.attributes.keys();
|
|
- while (enum.hasMoreElements()) {
|
|
+ Enumeration enum2 = this.attributes.keys();
|
|
+ while (enum2.hasMoreElements()) {
|
|
writer.write(' ');
|
|
- String key = (String) enum.nextElement();
|
|
+ String key = (String) enum2.nextElement();
|
|
String value = (String) this.attributes.get(key);
|
|
writer.write(key);
|
|
writer.write('='); writer.write('"');
|
|
@@ -2189,9 +2189,9 @@
|
|
writer.write('/'); writer.write('>');
|
|
} else {
|
|
writer.write('>');
|
|
- Enumeration enum = this.enumerateChildren();
|
|
- while (enum.hasMoreElements()) {
|
|
- XMLElement child = (XMLElement) enum.nextElement();
|
|
+ Enumeration enum2 = this.enumerateChildren();
|
|
+ while (enum2.hasMoreElements()) {
|
|
+ XMLElement child = (XMLElement) enum2.nextElement();
|
|
child.write(writer);
|
|
}
|
|
writer.write('<'); writer.write('/');
|