I am trying to use httpclient to post xml request as following:
String parm1 = MyXml.toString();
PostMethod post = new Postmethod(url);
post.setRequestEntity(new StringRequestEntity(parm1));
...
I have an object in the program which I want to convert it to xml representation.
My question is that what is the best way to create Myxml in xml format in java which then I can simply print out its String format later.
Thanks.