I use JDom to construct the sql as following :
 
      org.jdom.Namespace davNamespace =
          org.jdom.Namespace.getNamespace("D", "DAV:");
      Element searchRequest = new Element("searchRequest", davNamespace);
        
      Element basicSearch = new Element("basicSearch", davNamespace);
      searchRequest.addContent(basicSearch);
      Element select = new Element("select", davNamespace);
      basicSearch.addContent(select);
      Element prop = new Element("prop", davNamespace);
      select.addContent(prop);
      //property to search
      prop.addContent(new Element("displayname", davNamespace));
      Element from = new Element("from", davNamespace);
      basicSearch.addContent(from);
      Element scope = new Element("scope", davNamespace);
      from.addContent(scope);
      Element href = new Element("href", davNamespace);
      href.addContent("files");
      scope.addContent(href);
      Element depth = new Element("depth", davNamespace);
      depth.addContent("infinity");
      scope.addContent(depth);
      Element where = new Element("where", davNamespace);
      basicSearch.addContent(where);
      
      Element and = new Element("and",davNamespace);
      where.addContent(and);
      
      Element contains = new Element("contains", davNamespace);
      contains.addContent("Huyong");
      and.addContent(contains);
  
        Element eq = new Element("eq", davNamespace);
        and.addContent(eq);
    
        Element p2 = new Element("prop", davNamespace);
        eq.addContent(p2);
        p2.addContent(new Element("creationuser", davNamespace));
    
        Element literal = new Element("literal", davNamespace);
        //Value of the property
        literal.addContent("[EMAIL PROTECTED]");
        eq.addContent(literal);
 
    XMLOutputter out = new XMLOutputter();
   
    String query = out.outputString(searchRequest);

----------------------------------------------------
 
I' think this has nothing to do with the @ character.
There was a problem searching properies that contains xml elements
instead of plain text. I think I fixed this for next release.
Can you please provide the query you are excuting.
 
Stefan



---------------------------------
Do You Yahoo!?
嫌邮箱太小?雅虎电邮自助扩容!

Reply via email to