473,574 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get xml as a string from an XmlDocument object

hi all,

How would I get the xml as a string from an XmlDocument object?

thanks
Joyce

Jan 23 '07 #1
2 9824
You can use the InnerXml property.

-Asad

"joyce chan" wrote:
hi all,

How would I get the xml as a string from an XmlDocument object?

thanks
Joyce

Jan 24 '07 #2
joyce chan wrote:
How would I get the xml as a string from an XmlDocument object?
OuterXml is one direct way, then you have the Save method to save to a
StringWriter or the WriteTo method to do similar.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jan 24 '07 #3

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

Similar topics

0
1088
by: William Wong | last post by:
Hello. How to build a XMLDocument Object with embedded schema? Would you mind to give me some simple example, or point to somewhere to learn about such a technique? Thanks a lot William
8
2524
by: terrorix | last post by:
I also posted this article at: microsoft.public.dotnet.framework.aspnet -------- Hi, I Have this sql select(MS SQL): select a.ID, b.ID from Table as a
2
2374
by: Throne Software | last post by:
I am working on a ASP .Net page with a C# back end that displays, and give the option to save, an XmlDocument object. While displaying the XML in a literal was easy, I can't figure out how to allow the user to save the XmlDocument as a file without creating an XML file on the server. It is important that the XML file is not created server...
1
2916
by: Bob | last post by:
I'm wondering how much more memory an XmlDocument object takes than the corresponding Xml string? I have some user data to store in ASP.NET session and everytime it's used, an XmlDocument object is needed. If there's not too much difference in the memory consumption, then saving the object would make more sense than just saving the string. ...
1
1376
by: Gabe Covert | last post by:
If I instantiate an XmlDocument object, the load a file through the Load method, is there a way, later on in execution, to easily determine if the XmlDocument object has changed from the original version loaded? I'd like to be able to check a condition to see if the document in memory has been editted (i.e., nodes added, attributes changed,...
3
1709
by: almurph | last post by:
Hi everyone, Hope you can help me. I'm converting an XMlDocuemnt object to a string. I use the following code: Dim doc As New XmlDocument 'Convert XmlDocument object -> String Dim ms As New System.IO.MemoryStream
2
4312
by: Glenn Venzke | last post by:
I have an XMLDocument object that is attempting to parse an xml document generated by a cold fusion page. The problem is that for some reason the cold fusion page is generating a number of carriage returns preceding the XML declaration. This is causing the following error: System.Xml.XmlException: The XML declaration is unexpected. Line 80,...
0
799
by: Eduardo Silva | last post by:
Hi, some body know how to transform an xml hierarchy of classes into a xmlDocument object This is the class: <XmlRoot()_ Public Class achievementSubmission <XmlAttribute()>Public passportNumber As String <XmlElement(IsNullable:=False)>Public submissionReceipt As string <XmlElement(IsNullable:=False)>Public qualification As New...
0
1333
by: dthope69 | last post by:
I have a client that is requiring my web service to accept XMLDocument object as input parameter. I had created it initially to accept byte string and it worked fine. However, when changing to a XMLDocument object I am getting conversion errors when testing. It is telling me client program cannot convert xmldocument to xmlelement. It works...
0
8078
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7829
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8114
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6477
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5319
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3755
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2254
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.