|
Re: how to check "grammar" of xml using a schema or DTD withelementtree: msg#00003python.xml
Margie Levine wrote: > Right now I am using elementtree to check this within my program. IE, I > traverse the tree and make sure the xml meets the specifications. Based > on my reading, it seems that I can use a DTD or scheme to define the > "grammar" of my xml, but I can't figure out how to actually set this up. > It seems like I should just be able to specify my DTD or Schema and then > call ElementTree's parse method and Elementtre should just give me > errors if the xml doesn't conform to the rules. Maybe Elementtree just > doesn't support this? I see some doc that says lxml supports schema's, > will lxml do this for me? basic ET only does well-formedness checks; lxml comes with validation support for DTD:s, schemas, and Relax NG. > What are other folks doing to deal with this? well, I'm using separate validations tools as part of the test suite, and I'm then assuming that my code doesn't actually mess itself up when running... </F> _______________________________________________ XML-SIG maillist - XML-SIG@xxxxxxxxxx http://mail.python.org/mailman/listinfo/xml-sig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | how to check "grammar" of xml using a schema or DTD with elementtree: 00003, Margie Levine |
|---|---|
| Next by Date: | Buy Vicodin online today, overnight shipping xyiz kccg v: 00003, Drod421 |
| Previous by Thread: | how to check "grammar" of xml using a schema or DTD with elementtreei: 00003, Margie Levine |
| Next by Thread: | Buy Vicodin online today, overnight shipping xyiz kccg v: 00003, Drod421 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |