Hi Group,

 

You might have found the Title a little strange :); well following is the problem description:

I want to form a SOAP xml request to a servlet, I have my Request xml template ready.

Now I have following options:

1.       Load the xml template in an XmlDocument object and manipulate it.

2.       Load the xml template in a StringBuilder object, manipulate it and then load it in XmlDocument.

3.       Not using any template and creating the xml from scratch.

Following is the sample xml template which I will use:

 

  CUSTOMER _PLACEHOLDER

  SALES_ORG _ PLACEHOLDER

 

  DEFAULT_SORTING _PLACEHOLDER

  

WIDTH _HOLDER

  SERIE _HOLDER

 

  nodes is dynamic>

     

 

 

 

 

 

My Questions:

1.       For this scenario which of the above mentioned options which is more suitable?

2.       In General which options is more preferable?

3.       I know that second option of using StringBuilder is going to be very easy for implementation, but which option is better in terms of speed of execution and memory considerations?

 

Hoping to get some expert comments on this :)

 
Thanks,

Anup Daware