NonvalParse(isrc, readExtDtd, nodeFactories) -> parse(source, flags,
node_factories)
ValParse(isrc, nodeFactories) -> parse(source, PARSE_FLAGS_VALIDATE,
node_factories)
where flags is now one of:
PARSE_FLAGS_STANDALONE - no parsed external entities (or external DTD)
PARSE_FLAGS_EXTERNAL_ENTITIES - external entities (and external DTD) parsed
PARSE_FLAGS_VALIDATE - external entities & validation
and
ParseFragment(isrc, namespaces, nodeFactories) -> parse_fragment(source,
namespaces, node_factories)
Thanks,
Jeremy
I just wanted to clarify a bit. All the above is in the amara.domlette
namespace, so:
from amara.domlette import parse, PARSE_FLAGS_VALIDATE #Or you can use *
...
doc = parse(source, node_factories=mynodes) #no flags
doc1 = parse(source, PARSE_FLAGS_VALIDATE, mynodes)
The default amara.parse will be amara.bindery.parse (once this is written)
import amara
...
doc = amara.parse(source)
print doc.spam.eggs.xml()
--
Uche Ogbuji http://uche.ogbuji.net
Founding Partner, Zepheira http://zepheira.com
Linked-in profile: http://www.linkedin.com/in/ucheogbuji
Articles: http://uche.ogbuji.net/tech/publications/