Package com.bradmcevoy.http

Examples of com.bradmcevoy.http.XmlWriter.begin()


        XmlWriter writer = new XmlWriter(generatedXml);
        writer.writeXMLHeader();
        writer.open(WebDavProtocol.NS_DAV.getPrefix(), "schedule-response " + helper.generateNamespaceDeclarations());
        writer.newLine();
        for (SchedulingResponseItem resp : respItems) {
            Element elResp = writer.begin("C", "response");
            Element elRecip = elResp.begin("C", "recipient");
            elRecip.begin("D", "href").writeText(resp.getRecipient(), false).close();
            elRecip.close();
            StatusResponse stat = resp.getStatus();
            elRecip.begin(CALDAV_PREFIX, "request-status").writeText(stat.code + ";" + stat.description, false).close();
View Full Code Here


        XmlWriter writer = new XmlWriter( response.getOutputStream() );
        writer.writeXMLHeader();
        writer.open( "multistatus xmlns:D" + "=\"" + WebDavProtocol.NS_DAV + ":\"" ); // only single namespace for this method
        writer.newLine();
        for( HrefStatus status : statii ) {
            XmlWriter.Element elResponse = writer.begin( "response" ).open();
            writer.writeProperty( "", "href", status.href );
            writer.writeProperty( "", "status", status.status.code + "" );
            elResponse.close();
        }
        writer.close( "multistatus" );
View Full Code Here



    w.close("head");
    w.open("body");
    w.begin("h1").open().writeText(this.getName()).close();
    w.open("table");
    for (Resource r : getChildren()) {
      w.open("tr");

      w.open("td");
View Full Code Here

    for (Resource r : getChildren()) {
      w.open("tr");

      w.open("td");
      String path = buildHref(uri, r.getName());
      w.begin("a").writeAtt("href", path).open().writeText(r.getName()).close();

      w.begin("a").writeAtt("href", "#").writeAtt("onclick", "editDocument('" + path + "')").open().writeText("(edit with office)").close();

      w.close("td");
View Full Code Here

      w.open("td");
      String path = buildHref(uri, r.getName());
      w.begin("a").writeAtt("href", path).open().writeText(r.getName()).close();

      w.begin("a").writeAtt("href", "#").writeAtt("onclick", "editDocument('" + path + "')").open().writeText("(edit with office)").close();

      w.close("td");

      w.begin("td").open().writeText(r.getModifiedDate() + "").close();
      w.close("tr");
View Full Code Here

      w.begin("a").writeAtt("href", "#").writeAtt("onclick", "editDocument('" + path + "')").open().writeText("(edit with office)").close();

      w.close("td");

      w.begin("td").open().writeText(r.getModifiedDate() + "").close();
      w.close("tr");
    }
    w.close("table");
    w.close("body");
    w.close("html");
View Full Code Here

    String subpath = getRealFile().getCanonicalPath().substring( factory.getRoot().getCanonicalPath().length() ).replace( '\\', '/' );
    String uri = "/" + factory.getContextPath() + subpath;
    XmlWriter w = new XmlWriter( out );
    w.open( "html" );
    w.open( "body" );
    w.begin( "h1" ).open().writeText( this.getName() ).close();
    w.open( "table" );
    for( Resource r : getChildren() ) {
      w.open( "tr" );

      w.open( "td" );
View Full Code Here

    w.open( "table" );
    for( Resource r : getChildren() ) {
      w.open( "tr" );

      w.open( "td" );
      w.begin( "a" ).writeAtt( "href", uri + "/" + r.getName() ).open().writeText( r.getName() ).close();
      w.close( "td" );

      w.begin( "td" ).open().writeText( r.getModifiedDate() + "" ).close();
      w.close( "tr" );
    }
View Full Code Here

      w.open( "td" );
      w.begin( "a" ).writeAtt( "href", uri + "/" + r.getName() ).open().writeText( r.getName() ).close();
      w.close( "td" );

      w.begin( "td" ).open().writeText( r.getModifiedDate() + "" ).close();
      w.close( "tr" );
    }
    w.close( "table" );
    w.close( "body" );
    w.close( "html" );
View Full Code Here

    String subpath = realFile.getCanonicalPath().substring( factory.getRoot().getCanonicalPath().length() ).replace( '\\', '/' );
    String uri = "/" + factory.getContextPath() + subpath;
    XmlWriter w = new XmlWriter( out );
    w.open( "html" );
    w.open( "body" );
    w.begin( "h1" ).open().writeText( this.getName() ).close();
    w.open( "table" );
    for( Resource r : getChildren() ) {
      w.open( "tr" );

      w.open( "td" );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.