Re: Serializing xml nodes
Julian Reschke <[email protected]>
| Newsgroups | gmane.ietf.webdav |
|---|---|
| Message-ID | <[email protected]> |
Evert | Rooftop wrote:
> Hi guys,
>
> I'm working on a WebDAV implementation, and for convenience i'd like to
> serialize the full xml namespace + tag name into a single string.
>
> So far I've used:
>
> DAV:#resourcetype
>
> But, I realize this isn't ideal because XML namespaces can contain the
> #. I've seen some WebDAV use :
>
> {DAV:}resourcetype
>
> Would this be the preferred serialization method?
> ...
Indeed.
This is the format proposed by Jim Clark a long time ago, so sometimes
it's called "Clark Notation". It's also used in quite a few APIs that
use namespace/localname pairs as identifiers, such as in SAX or in JCR 2.0.
BR, Julian