while (e.hasMoreElements()) {
String key = (String) e.nextElement();
if (dbmode && key.charAt(0) == '_') {
continue;
}
IProperty prop = node.get(key);
if (prop != null) {
boolean validName = isValidElementName(key);
String elementName;
String propName;
if (validName) {
elementName = key;
propName = null;
} else {
elementName = "property";
propName = key;
}
int type = prop.getType();
if (type == IProperty.NODE) {
write(prop.getNodeValue(), elementName, propName, level);
} else {
writeProperty(prop, elementName, propName);
}
}
}