MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / addAttributes

Method addAttributes

base/poco/XML/src/XMLWriter.cpp:836–858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

834
835
836void XMLWriter::addAttributes(AttributeMap& attributeMap, const Attributes& attributes, const XMLString& elementNamespaceURI)
837{
838 for (int i = 0; i < attributes.getLength(); i++)
839 {
840 XMLString namespaceURI = attributes.getURI(i);
841 XMLString localName = attributes.getLocalName(i);
842 XMLString qname = attributes.getQName(i);
843 if (!localName.empty())
844 {
845 XMLString prefix;
846 if (!namespaceURI.empty())
847 prefix = _namespaces.getPrefix(namespaceURI);
848 if (!prefix.empty())
849 {
850 qname = prefix;
851 qname.append(toXMLString(MARKUP_COLON));
852 }
853 else qname.clear();
854 qname.append(localName);
855 }
856 attributeMap[qname] = attributes.getValue(i);
857 }
858}
859
860
861void XMLWriter::addAttributes(CanonicalAttributeMap& attributeMap, const Attributes& attributes, const XMLString& elementNamespaceURI)

Callers

nothing calls this directly

Calls 8

toXMLStringFunction · 0.85
getURIMethod · 0.80
getLengthMethod · 0.45
emptyMethod · 0.45
appendMethod · 0.45
clearMethod · 0.45
getValueMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected