void MarkupAccumulator::appendElement(StringBuilder& result, const Element& element, Namespaces* namespaces) { appendOpenTag(result, element, namespaces); if (element.hasAttributes()) { for (const Attribute& attribute : element.attributesIterator()) appendAttribute(result, element, attribute, namespaces); } // Give an opportunity to subclasses to add their own attributes. appendCustomAttributes(result, element, namespaces); appendCloseTag(result, element); }
void MarkupAccumulator::appendElement(StringBuilder& out, Element* element, Namespaces* namespaces) { appendOpenTag(out, element, namespaces); if (element->hasAttributes()) { unsigned length = element->attributeCount(); for (unsigned int i = 0; i < length; i++) appendAttribute(out, element, *element->attributeItem(i), namespaces); } // Give an opportunity to subclasses to add their own attributes. appendCustomAttributes(out, element, namespaces); appendCloseTag(out, element); }
void MarkupAccumulator::appendElement(StringBuilder& result, const Element& element, Namespaces* namespaces) { appendOpenTag(result, element, namespaces); if (element.hasAttributes()) { unsigned length = element.attributeCount(); for (unsigned int i = 0; i < length; i++) appendAttribute(result, element, element.attributeAt(i), namespaces); } // Give an opportunity to subclasses to add their own attributes. appendCustomAttributes(result, element, namespaces); appendCloseTag(result, element); }