void DatasetDOMStringMap::getNames(Vector<String>& names)
{
    AttributeCollection attributes = m_element->attributes();
    for (const Attribute& attr : attributes) {
        if (isValidAttributeName(attr.localName()))
            names.append(convertAttributeNameToPropertyName(attr.localName()));
    }
}
static bool propertyNameMatchesAttributeName(const String& propertyName, const String& attributeName)
{
    // FIXME: This should be able to match without creating a new string.

    if (!isValidAttributeName(attributeName))
        return false;

    String convertedName = convertAttributeNameToPropertyName(attributeName);
    return (convertedName == propertyName);
}
void DatasetDOMStringMap::getNames(Vector<String>& names)
{
    NamedNodeMap* attributeMap = m_element->attributes(true);
    if (attributeMap) {
        unsigned length = attributeMap->length();
        for (unsigned i = 0; i < length; i++) {
            Attribute* attribute = attributeMap->attributeItem(i);
            if (isValidAttributeName(attribute->localName()))
                names.append(convertAttributeNameToPropertyName(attribute->localName()));
        }
    }
}
void DatasetDOMStringMap::getNames(Vector<String>& names)
{
    if (!m_element.hasAttributes())
        return;

    unsigned length = m_element.attributeCount();
    for (unsigned i = 0; i < length; i++) {
        const Attribute& attribute = m_element.attributeAt(i);
        if (isValidAttributeName(attribute.localName()))
            names.append(convertAttributeNameToPropertyName(attribute.localName()));
    }
}
Beispiel #5
0
void DatasetDOMStringMap::getNames(Vector<String>& names)
{
    if (!m_element->hasAttributes())
        return;

    AttributeIteratorAccessor attributes = m_element->attributesIterator();
    AttributeConstIterator end = attributes.end();
    for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
        if (isValidAttributeName(it->localName()))
            names.append(convertAttributeNameToPropertyName(it->localName()));
    }
}