Namespaces are defined with the string "xmlns" and not "xmnls".  xmnls will be treated as an attribute.
----- Original Message -----
From: John Hall
Sent: 19 March 2001 22:55
Subject: Newbie. Default Namespace dosen't work? WebDav.

 

My company is using Xerces 1.2.3 (J) for its XML parser.  We are implementing WebDav.

 

The parser calls my function when a new element is encountered:

‘startElement( String p_namespaceName, String p_localName, String raw, Attributes p_attrs)

 

When I use the following XML:

<?xml version="1.0" encoding="utf-8" ?>

<propfind xmnls="DAV:" >

  <prop>

    <creationdate/>

  </prop>

</propfind>

 

I expect “p_namespaceName” to be “DAV:” for “prop”, “creationdate” and “propfind”, because I have declared the default namespace “xmnls=”DAV:”.  However, my system is giving me an empty string for the namespace.  So I can’t tell whether a default namespace was correctly used, or the element is a part of the null namespace (which would be illegal).

 

Is this a known problem, or is there something I should be doing differently?

 

 

 

Reply via email to