1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
|
--- a/Sources/Lite/nanoxml/XMLElement.java
+++ b/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 enu = this.entities.keys();
+ while (enu.hasMoreElements()) {
+ Object key = enu.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 enu = this.attributes.keys();
+ while (enu.hasMoreElements()) {
writer.write(' ');
- String key = (String) enum.nextElement();
+ String key = (String) enu.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 enu = this.enumerateChildren();
+ while (enu.hasMoreElements()) {
+ XMLElement child = (XMLElement) enu.nextElement();
child.write(writer);
}
writer.write('<'); writer.write('/');
--- a/Sources/Java/net/n3/nanoxml/NonValidator.java
+++ b/Sources/Java/net/n3/nanoxml/NonValidator.java
@@ -587,10 +587,10 @@
int lineNr)
{
Properties props = (Properties) this.currentElements.pop();
- Enumeration enum = props.keys();
+ Enumeration enu = props.keys();
- while (enum.hasMoreElements()) {
- String key = (String) enum.nextElement();
+ while (enu.hasMoreElements()) {
+ String key = (String) enu.nextElement();
extraAttributes.put(key, props.get(key));
}
}
--- a/Sources/Java/net/n3/nanoxml/XMLElement.java
+++ b/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 enu = this.children.elements();
+ while (enu.hasMoreElements()) {
+ IXMLElement child = (IXMLElement) enu.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 enu = this.children.elements();
+ while (enu.hasMoreElements()) {
+ IXMLElement child = (IXMLElement) enu.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 enu = this.children.elements();
+ while (enu.hasMoreElements()) {
+ IXMLElement child = (IXMLElement) enu.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 enu = this.children.elements();
+ while (enu.hasMoreElements()) {
+ IXMLElement child = (IXMLElement) enu.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 enu = this.attributes.elements();
+ while (enu.hasMoreElements()) {
+ XMLAttribute attr = (XMLAttribute) enu.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 enu = this.attributes.elements();
+ while (enu.hasMoreElements()) {
+ XMLAttribute attr = (XMLAttribute) enu.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 enu = this.attributes.elements();
+ while (enu.hasMoreElements()) {
+ XMLAttribute attr = (XMLAttribute) enu.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 enu = this.attributes.elements();
+ while (enu.hasMoreElements()) {
+ XMLAttribute attr = (XMLAttribute) enu.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 enu = this.attributes.elements();
+ while (enu.hasMoreElements()) {
+ XMLAttribute attr = (XMLAttribute) enu.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 enu = this.attributes.elements();
+ while (enu.hasMoreElements()) {
+ XMLAttribute attr = (XMLAttribute) enu.nextElement();
if (! elt.hasAttribute(attr.getName(), attr.getNamespace())) {
return false;
}
--- a/Sources/Java/net/n3/nanoxml/XMLWriter.java
+++ b/Sources/Java/net/n3/nanoxml/XMLWriter.java
@@ -182,10 +182,10 @@
}
}
- Enumeration enum = xml.enumerateAttributeNames();
+ Enumeration enu = xml.enumerateAttributeNames();
- while (enum.hasMoreElements()) {
- String key = (String) enum.nextElement();
+ while (enu.hasMoreElements()) {
+ String key = (String) enu.nextElement();
int index = key.indexOf(':');
if (index >= 0) {
@@ -203,10 +203,10 @@
}
}
- enum = xml.enumerateAttributeNames();
+ enu = xml.enumerateAttributeNames();
- while (enum.hasMoreElements()) {
- String key = (String) enum.nextElement();
+ while (enu.hasMoreElements()) {
+ String key = (String) enu.nextElement();
String value = xml.getAttribute(key, null);
this.writer.print(" " + key + "=\"");
this.writeEncoded(value);
@@ -229,10 +229,10 @@
writer.println();
}
- enum = xml.enumerateChildren();
+ enu = xml.enumerateChildren();
- while (enum.hasMoreElements()) {
- IXMLElement child = (IXMLElement) enum.nextElement();
+ while (enu.hasMoreElements()) {
+ IXMLElement child = (IXMLElement) enu.nextElement();
this.write(child, prettyPrint, indent + 4,
collapseEmptyElements);
}
--- a/Sources/Java/net/n3/nanoxml/StdXMLParser.java
+++ b/Sources/Java/net/n3/nanoxml/StdXMLParser.java
@@ -492,10 +492,10 @@
extraAttributes,
this.reader.getSystemID(),
this.reader.getLineNr());
- Enumeration enum = extraAttributes.keys();
+ Enumeration enu = extraAttributes.keys();
- while (enum.hasMoreElements()) {
- String key = (String) enum.nextElement();
+ while (enu.hasMoreElements()) {
+ String key = (String) enu.nextElement();
String value = extraAttributes.getProperty(key);
attrNames.addElement(key);
attrValues.addElement(value);
|