Lines Matching refs:child
265 child = dom.appendChild(dom.createElement("abc"))
267 child.setAttribute("def", "ghi")
268 self.confirm(child.getAttribute("def") == "ghi")
269 self.confirm(child.attributes["def"].value == "ghi")
271 child.setAttribute("jkl", "mno")
272 self.confirm(child.getAttribute("jkl") == "mno")
273 self.confirm(child.attributes["jkl"].value == "mno")
275 self.confirm(len(child.attributes) == 2)
277 child.setAttribute("def", "newval")
278 self.confirm(child.getAttribute("def") == "newval")
279 self.confirm(child.attributes["def"].value == "newval")
281 self.confirm(len(child.attributes) == 2)
286 child = dom.appendChild(dom.createElement("abc"))
288 self.confirm(len(child.attributes) == 0)
289 child.setAttribute("def", "ghi")
290 self.confirm(len(child.attributes) == 1)
291 del child.attributes["def"]
292 self.confirm(len(child.attributes) == 0)
297 child = dom.appendChild(dom.createElement("abc"))
299 child.setAttribute("def", "ghi")
300 self.confirm(len(child.attributes) == 1)
301 self.assertRaises(xml.dom.NotFoundErr, child.removeAttribute, "foo")
302 child.removeAttribute("def")
303 self.confirm(len(child.attributes) == 0)
308 child = dom.appendChild(
310 child.setAttributeNS("http://www.w3.org", "xmlns:python",
312 child.setAttributeNS("http://www.python.org", "python:abcattr", "foo")
313 self.assertRaises(xml.dom.NotFoundErr, child.removeAttributeNS,
315 self.confirm(len(child.attributes) == 2)
316 child.removeAttributeNS("http://www.python.org", "abcattr")
317 self.confirm(len(child.attributes) == 1)
322 child = dom.appendChild(dom.createElement("foo"))
323 child.setAttribute("spam", "jam")
324 self.confirm(len(child.attributes) == 1)
325 node = child.getAttributeNode("spam")
326 self.assertRaises(xml.dom.NotFoundErr, child.removeAttributeNode,
328 child.removeAttributeNode(node)
329 self.confirm(len(child.attributes) == 0
330 and child.getAttributeNode("spam") is None)
340 child = dom.appendChild(dom.createElement("foo"))
341 child.setAttribute("spam", "jam")
342 self.confirm(child.hasAttribute("spam"))
393 child = dom.appendChild(
395 self.assertEqual(child.getAttribute('missing'), '')
399 child = dom.appendChild(
401 child.setAttributeNS("http://www.w3.org", "xmlns:python",
403 self.assertEqual(child.getAttributeNS("http://www.w3.org", "python"),
405 self.assertEqual(child.getAttributeNS("http://www.w3.org", "other"),
407 child2 = child.appendChild(dom.createElement('abc'))
1090 "Final child's .nextSibling should be None")
1364 # Check that replacing a child with itself leaves the tree unchanged