Did I find the right examples for you? yes no

All Samples(8)  |  Call(7)  |  Derive(0)  |  Import(1)

        def parse(obj, uri=None, entity_factory=None, standalone=False, validate=False):
    from amara import tree
    if not entity_factory:
        entity_factory = nodes.Document
    return tree.parse(obj, uri, entity_factory=entity_factory, standalone=standalone, validate=validate)
        


src/a/m/Amara-2.0.0/demo/7days/day2.py   Amara(Download)
</monty>"""
 
doc = dom.parse(MONTY_XML)
for p in doc.getElementsByTagNameNS(None, u"python"): #A generator
    xml_print(p)

src/a/m/Amara-2.0.0/test/dom/test_basics.py   Amara(Download)
import unittest
from amara.dom import parse
from xml.dom import Node
from amara import tree
import os
    def test_parse_with_string(self):
        """Parse with string"""
        doc = parse(MONTY_XML)
        self.run_checks(doc)
 
        fout.close()
        fout = open(fname, 'r')
        doc = parse(fout)
        fout.close()
        self.run_checks(doc)
        fout.write(MONTY_XML)
        fout.close()
        doc = parse(fname)
        self.run_checks(doc)
 
    def Xtest_parse_with_url(self):
        doc = parse(TEST_URL)
        #Minimal node testing
        self.assertEqual(len(doc.xml_children), 1)
        self.assertEqual(doc.xml_children[0].xml_type, tree.element.xml_type)

src/a/m/Amara-2.0.0/test/sevendays/test_two.py   Amara(Download)
    def test_dom(self):
        doc = dom.parse(self.MONTY_XML)
        for p, line in zip(doc.getElementsByTagNameNS(None, u"python"), self.lines_py): #A generator
            output = cStringIO.StringIO()
            xml_print(p, stream=output)