473,499 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

InnerXml

hello,

i despair on one simple problem (maybe it's to simple???)

I have the string txt = "hallo</hmm>" or txt = "am&24"

and want to pass it to the XmlNode InnerXml property

myNode.InnerXml = txt //error

----------------------------------------------------------

how can i transform that string to a valid value. i searched thru all
classes and maybe i'm to blind...

hope some understand and can help

mm
Nov 11 '05 #1
3 3864
If you are going to set InnerXml, it must be valid xml.

If you just want to store the value, call InnerText

Joe Feser

"Martin Madreza" <ma*********@yahoo.de> wrote in message
news:f4**************************@posting.google.c om...
hello,

i despair on one simple problem (maybe it's to simple???)

I have the string txt = "hallo</hmm>" or txt = "am&24"

and want to pass it to the XmlNode InnerXml property

myNode.InnerXml = txt //error

----------------------------------------------------------

how can i transform that string to a valid value. i searched thru all
classes and maybe i'm to blind...

hope some understand and can help

mm

Nov 11 '05 #2
thanks!

One question. Before I found a solution:

xmlNode.AppendChild(xmlDocument.CreateTextNode(txt ));

is this a worser, slower approach or equal?

mm
Nov 11 '05 #3
Well it will work because you are adding text and not Xml.

It is really no different than just setting the xmlNode.InnerText Property.

Maybe someone from the team could answer, I personally just set InnerText

Joe Feser

"Martin Madreza" <ma*********@yahoo.de> wrote in message
news:f4**************************@posting.google.c om...
thanks!

One question. Before I found a solution:

xmlNode.AppendChild(xmlDocument.CreateTextNode(txt ));

is this a worser, slower approach or equal?

mm

Nov 11 '05 #4

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

Similar topics

6
7599
by: Philipp Lenssen | last post by:
Why isn't there a way in standard DOM to access all XML of a node? (Similar to what outerHTML and innerHTML can do on Firefox or Internet Explorer when accessing HTML.) Or am I missing something?...
3
6551
by: Henrik K | last post by:
Selecting element nodes from a xmlDataDocument using the childNodes collection or by using selectSingleNode and then reading innerXml or outerXml leaks cpu-resources. A trivial example showing...
2
3186
by: kben | last post by:
I'm trying to get some text into an XMLElement that may or may not contain markup, and it may or may not contain characters that need escaping. I want the special characters escaped, but I want to...
1
9618
by: Peter Nofelt | last post by:
Hey All, I'm running into this issue with parsing through an xml document by tag name. Below is an example xml document: File Name: things.xml <things> <people> <name>Peter</name>
3
3937
by: Bas Jaburg | last post by:
I'm creating a Windows App in C#(Smart Client)that calls a webservice. The webservice returns this: <?xml version="1.0" encoding="utf-8" ?> <table id="klasse" records="4792"> <record...
1
2527
by: ALI-R | last post by:
I am showing the InnerXml of a node (in a treeView Control) in a tooltip ,but it is not formatted well ,all the elements after each other ,is there a way to format the innertext in a tooltip. ...
15
3283
by: janhm | last post by:
Hello. I need to loop through a xml file finding a specific innerxml text and then ad the content to a treeview. For example. If the innerxml im searching for is "item001" then I want the...
2
11914
by: =?Utf-8?B?c2VlbWE=?= | last post by:
What is the differnce between outerXML and innerXML.
4
6761
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... I just noticed something that seems counter-intuitive to me. By default an XmlDocument is set with PreserveWhitespace=false. This means that XmlDocument.Load() or .LoadXml() will...
0
7007
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
7220
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...
1
6894
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
5470
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
4600
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...
0
3099
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...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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 ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.