documentation/manual/working/javaGuide/main/xml/code/javaguide/xml/JavaXmlRequests.java
@BodyParser.Of(BodyParser.Xml.class)
  public Result sayHelloBP(Http.Request request) {
    Document dom = request.body().asXml();
    if (dom == null) {
      return badRequest("Expecting Xml data");
    } else {
      String name = XPath.selectText("//name", dom);
      if (name == null) {
        return badRequest("Missing parameter [name]");
      } else {
        return ok("Hello " + name);
      }
    }
  }
@BodyParser.Of(BodyParser.Xml.class)
  public Result sayHelloBP(Http.Request request) {
    Document dom = request.body().asXml();
    if (dom == null) {
      return badRequest("Expecting Xml data");
    } else {
      String name = XPath.selectText("//name", dom);
      if (name == null) {
        return badRequest("Missing parameter [name]");
      } else {
        return ok("Hello " + name);
      }
    }
  }
@ BodyParser . Of ( BodyParser . Xml . class ) public Result sayHelloBP ( Http . Request request ) { Document dom = request . body ( ) . asXml ( ) ; if ( dom == null ) { return badRequest ( "Expecting Xml data" ) ; } else { String name = XPath . selectText ( "//name" , dom ) ; if ( name == null ) { return badRequest ( "Missing parameter [name]" ) ; } else { return ok ( "Hello " + name ) ; } } }
#xml-hello-bodyparser
#xml - hello - bodyparser