/**
   * Create a new <code>DavPropertyNameSet</code> from the given DAV:prop element.
   *
   * @param propElement
   * @throws IllegalArgumentException if the specified element is <code>null</code> or is not a
   *     DAV:prop element.
   */
  public DavPropertyNameSet(Element propElement) {
    if (!DomUtil.matches(propElement, XML_PROP, NAMESPACE)) {
      throw new IllegalArgumentException("'DAV:prop' element expected.");
    }

    // fill the set
    ElementIterator it = DomUtil.getChildren(propElement);
    while (it.hasNext()) {
      add(DavPropertyName.createFromXml(it.nextElement()));
    }
  }
 /**
  * Creates a DavPropertyName from the given parameters and add it to this set.
  *
  * @param localName
  * @param namespace
  * @return <tt>true</tt> if the set did not already contain the specified property name.
  */
 public boolean add(String localName, Namespace namespace) {
   return set.add(DavPropertyName.create(localName, namespace));
 }