Package com.bradmcevoy.http.webdav

Examples of com.bradmcevoy.http.webdav.PropFindSaxHandler


import javax.xml.namespace.QName;

public class TestSaxHandler extends TestCase {
    public void testPropFind() throws Exception{
        XMLReader reader = XMLReaderFactory.createXMLReader();
        PropFindSaxHandler handler = new PropFindSaxHandler();
        reader.setContentHandler(handler);
        reader.parse(new InputSource(PropFindSaxHandler.class.getResourceAsStream("/sample_prop_find.xml")));
        Map<QName,String> result = handler.getAttributes();
        assertEquals("httpd/unix-directory", result.get(new QName( "DAV:", "getcontenttype")));
        assertEquals("", result.get(new QName( "DAV:", "resourcetype")));
        assertEquals("Thu, 01 Jan 1970 00:00:00 GMT", result.get(new QName( "DAV:", "getlastmodified")));
        assertEquals("1970-01-01T00:00:00Z", result.get(new QName( "DAV:", "creationdate")));
    }
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.webdav.PropFindSaxHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.