You don't just want to parse the XSD data because there lots of XML
parsers for Python. You want to validate documents against the schema,
right? I haven't yet seen a good XML schema validator for Python.
libxml2 has good bindings for validating XML against RelaxNG schemas.
- C
Bizarro-02 wr
Peter Otten wrote:
> Chris McDonough wrote:
>
>>> Can Python
>>> create list dynamically, I want to implement a program which will read
>>> data from a file and store each line into a list, is this possible?
>> L = []
>> [L.append(line) for line in (op
News wrote:
> I am new in using Python
>
> Anyone know how to implement breadth first search using Python?
Breadth-first search of what? It depends what kind of tree you're
searching, but here's a page with a few implementations:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/231503
ElementTree's XML serialization routine implied by tree._write(file,
node, encoding, namespaces looks like this (elided):
def _write(self, file, node, encoding, namespaces):
# write XML to file
tag = node.tag
if tag is Comment:
file.write("" % _escape_