473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

XmlDocument Vs StringBuilder

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:
<?xml version="1.0" encoding="UTF-8"?>
<MT_MaterialSearchRequest>
<!-- Customer Data -->
<CUSTOMERCUSTOMER _PLACEHOLDER</CUSTOMER>
<SALES_ORGSALES_ORG _ PLACEHOLDER </SALES_ORG>
<!-- Limit on the size of the search result -->
<DEFAULT_SORTINGDEFAULT_SORTING _PLACEHOLDER</DEFAULT_SORTING>
<!-- Material Data -->
<WIDTHWIDTH _HOLDER</WIDTH>
<SERIESERIE _HOLDER</SERIE>
<!-- Material List -->
<VISIBILITY_ITEM_IN>
<ITEM<!-NOTE: Number of <ITEMnodes is dynamic>
<MATERIAL></MATERIAL>
</ITEM>
<ITEM>
<MATERIAL></MATERIAL>
</ITEM>
</VISIBILITY_ITEM_IN>
</MT_MaterialSearchRequest>

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

Feb 8 '07 #1
0 936

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: TnaG | last post by:
Can someone answer this probably obvious question. I have an xmldocument that i want to apply an xslt file to. All the examples i find assume u are applying the xslt to an xml file you've read...
3
by: Gustaf Liljegren | last post by:
I think I must use MemoryStream, but whenever I search for examples of MemoryStream, I get lots byte-per-byte reading, buffers and so on. It's hard to understand and seem overkill for my case...
1
by: Waldemar FEM | last post by:
What is an easy way of making a deep copy of an XmlDocument object? Right now I'm doing something like this: XmlDocument inputDoc; XmlDocument copyDoc; ..... StringBuilder builder = new...
1
by: Anup Daware | last post by:
XmlDocument Vs StringBuilder 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.