Non-namespace aware Yadis file parsing
t.broyer at gmail.com
Sat May 20 10:43:53 UTC 2006
2006/5/20, Drummond Reed <drummond.reed at cordance.net>:
> For what it's worth, we had the same discussion in the XRI TC...and came to
> the same conclusion. To do otherwise is to risk breaking XML.
> We do recommend that implementations use the XRD namespace as the default
> just to keep things simple, but that's all.
Did you mean "prefix"? The namespace is the one identified by the
"namespace URI", and in practice it is bound to a "namespace prefix"
with "xmlns:" attributes.
XML can be parsed using regexes or non-namespace aware XML parsers if
you care to implement namespace processing on top of your parsing
In any case (whether you use namespaces or not), extracting data using
regexes is risky (because you might extract things that look like
markup but are actually literal data in a CDATA section, things that
are in a "subtree" other than the one you want to get, etc.)
So, if you want to use XML, you have to use an XML parser (and this
one can be built using regexes if you want instead of just
"character-by-character iteration"; this only to say that "you can't
parse XML using regexes" is a false assertion)
More information about the yadis