Lines Matching refs:XMLNode
63 XMLNode XMLDocument::GetRootElement(const char *required_name) { in GetRootElement()
66 XMLNode root_node(xmlDocGetRootElement(m_document)); in GetRootElement()
76 return XMLNode(); in GetRootElement()
89 #pragma mark-- XMLNode
91 XMLNode::XMLNode() = default;
93 XMLNode::XMLNode(XMLNodeImpl node) : m_node(node) {} in XMLNode() function in XMLNode
95 XMLNode::~XMLNode() = default;
97 void XMLNode::Clear() { m_node = nullptr; } in Clear()
99 XMLNode XMLNode::GetParent() const { in GetParent()
102 return XMLNode(m_node->parent); in GetParent()
104 return XMLNode(); in GetParent()
106 return XMLNode(); in GetParent()
110 XMLNode XMLNode::GetSibling() const { in GetSibling()
113 return XMLNode(m_node->next); in GetSibling()
115 return XMLNode(); in GetSibling()
117 return XMLNode(); in GetSibling()
121 XMLNode XMLNode::GetChild() const { in GetChild()
125 return XMLNode(m_node->children); in GetChild()
127 return XMLNode(); in GetChild()
129 return XMLNode(); in GetChild()
133 std::string XMLNode::GetAttributeValue(const char *name, in GetAttributeValue()
154 bool XMLNode::GetAttributeValueAsUnsigned(const char *name, uint64_t &value, in GetAttributeValueAsUnsigned()
160 void XMLNode::ForEachChildNode(NodeCallback const &callback) const { in ForEachChildNode()
167 void XMLNode::ForEachChildElement(NodeCallback const &callback) const { in ForEachChildElement()
169 XMLNode child = GetChild(); in ForEachChildElement()
175 void XMLNode::ForEachChildElementWithName(const char *name, in ForEachChildElementWithName()
178 XMLNode child = GetChild(); in ForEachChildElementWithName()
184 void XMLNode::ForEachAttribute(AttributeCallback const &callback) const { in ForEachAttribute()
207 void XMLNode::ForEachSiblingNode(NodeCallback const &callback) const { in ForEachSiblingNode()
213 if (!callback(XMLNode(node))) in ForEachSiblingNode()
220 void XMLNode::ForEachSiblingElement(NodeCallback const &callback) const { in ForEachSiblingElement()
230 if (!callback(XMLNode(node))) in ForEachSiblingElement()
237 void XMLNode::ForEachSiblingElementWithName( in ForEachSiblingElementWithName()
259 if (!callback(XMLNode(node))) in ForEachSiblingElementWithName()
266 llvm::StringRef XMLNode::GetName() const { in GetName()
276 bool XMLNode::GetElementText(std::string &text) const { in GetElementText()
297 bool XMLNode::GetElementTextAsUnsigned(uint64_t &value, uint64_t fail_value, in GetElementTextAsUnsigned()
305 bool XMLNode::GetElementTextAsFloat(double &value, double fail_value) const { in GetElementTextAsFloat()
312 bool XMLNode::NameIs(const char *name) const { in NameIs()
326 XMLNode XMLNode::FindFirstChildElementWithName(const char *name) const { in FindFirstChildElementWithName()
327 XMLNode result_node; in FindFirstChildElementWithName()
331 name, [&result_node](const XMLNode &node) -> bool { in FindFirstChildElementWithName()
341 bool XMLNode::IsValid() const { return m_node != nullptr; } in IsValid()
343 bool XMLNode::IsElement() const { in IsElement()
351 XMLNode XMLNode::GetElementForPath(const NamePath &path) { in GetElementForPath()
358 XMLNode node = FindFirstChildElementWithName(path[0].c_str()); in GetElementForPath()
367 return XMLNode(); in GetElementForPath()
387 XMLNode plist = m_xml_doc.GetRootElement("plist"); in ParseFile()
390 [this](const XMLNode &dict) -> bool { in ParseFile()
404 XMLNode value_node = GetValueNode(key); in GetValueAsString()
410 XMLNode ApplePropertyList::GetValueNode(const char *key) const { in GetValueNode()
411 XMLNode value_node; in GetValueNode()
416 "key", [key, &value_node](const XMLNode &key_node) -> bool { in GetValueNode()
433 bool ApplePropertyList::ExtractStringFromValueNode(const XMLNode &node, in ExtractStringFromValueNode()
454 static StructuredData::ObjectSP CreatePlistValue(XMLNode node) { in CreatePlistValue()
459 node.ForEachChildElement([&array_sp](const XMLNode &node) -> bool { in CreatePlistValue()
465 XMLNode key_node; in CreatePlistValue()
469 [&key_node, &dict_sp](const XMLNode &node) -> bool { in CreatePlistValue()