in src/main/java/org/apache/sling/jcr/contentparser/impl/JcrXmlContentParser.java [106:142]
public void startElement(String uri, String localName, String qName, Attributes attributes)
throws SAXException {
String resourceName = decodeName(qName);
// generate path for element
String path;
if (paths.isEmpty()) {
path = "/";
}
else {
path = helper.concatenatePath(paths.peek(), resourceName);
if (helper.ignoreResource(resourceName)) {
ignoredPaths.add(path);
}
}
paths.push(path);
// skip further processing if this path or a parent path is ignored
if (isIgnoredPath(path)) {
return;
}
// get properties
Map<String,Object> properties = new HashMap<>();
for (int i=0; i<attributes.getLength(); i++) {
String propertyName = helper.cleanupPropertyName(decodeName(attributes.getQName(i)));
if (!helper.ignoreProperty(propertyName)) {
Object value = JcrXmlValueConverter.parseValue(propertyName, attributes.getValue(i));
if (value != null) {
properties.put(propertyName, value);
}
}
}
helper.ensureDefaultPrimaryType(properties);
contentHandler.resource(path, properties);
}