473,403 Members | 2,270 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,403 software developers and data experts.

xmlNode auf xmlElement casten

hi,

ich habe eine anwendung, welche ein xml document erstellt.

um festzustellen, ob ein element bereits vorhanden ist,
verwende ich die funktion

selectsinglenode( ....)

diese funktion liefert mir ein element des typs node.

das xmlNode kann aber nicht wirklich viel. z.b Attribute
anhängen...

kann ich das xmlNode auf xmlElement caste?

xmlNode myNode;
xmlElement myElement;

myNode=myDoc.SelectSingleNode(...);
myElement=(xmlElement)myNode;

ist das möglich, oder gibt es eine möglichkeit attribute
an ein xmlNode anzuhängen?

danke
Nov 15 '05 #1
1 4724
ich spreche keine duetsche. (I speak no German). And I know very
little XML, so here's Google's translation for anybody who can assist
andrej... (Of course, he'd probably prefer a German response)...

I have an application, which provides xml a document. in order to
determine, whether an element is already present, I use the function
selectsinglenode(....) this function supplies an element of the type
node to me with. the xmlNode cannot attach however really much e.g.
attributes... can I do the xmlNode on xmlElement caste?

xmlNode myNode;
xmlElement myElement;
myNode=myDoc.SelectSingleNode(...);
myElement=(xmlElement)myNode;

is that possible, or does give it a possibility of attributes to a
xmlNode to attach? thanks

"andrej" <an****@gmx.at> wrote in message
news:00****************************@phx.gbl...
hi,

ich habe eine anwendung, welche ein xml document erstellt.

um festzustellen, ob ein element bereits vorhanden ist,
verwende ich die funktion

selectsinglenode( ....)

diese funktion liefert mir ein element des typs node.

das xmlNode kann aber nicht wirklich viel. z.b Attribute
anhängen...

kann ich das xmlNode auf xmlElement caste?

xmlNode myNode;
xmlElement myElement;

myNode=myDoc.SelectSingleNode(...);
myElement=(xmlElement)myNode;

ist das möglich, oder gibt es eine möglichkeit attribute
an ein xmlNode anzuhängen?

danke
Nov 15 '05 #2

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

Similar topics

2
by: Earl Teigrob | last post by:
I am having trouble creating an Attribute on a new node. The NodeObject.SetAttribute(x,y) method does not exist for the "RecordElement" node. What am I missing??? Earl XmlDocument d = new...
2
by: Pluto | last post by:
What is the difference between XmlNode and XmlElement? I'm trying to implement the code at http://www.devx.com/dotnet/Article/11616/0/page/3 in C# and I'm getting an error at this line:...
2
by: David Elliott | last post by:
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString"...
3
by: Mahesh Devjibhai Dhola | last post by:
Hi All, I want to make a custom class in c#, which extends System.Xml.XmlNode class of BCL. Now in custom class, I have implement abstract methods of XmlNode class also. Now when I am trying to...
1
by: Dominic Messenger | last post by:
I have a schema that I load into classes that mirror the schema using the XmlSerialization. The schema contains an xsd:Any that I load into 'Extra' as follows: public XmlNode Extra { get {...
5
by: Paul | last post by:
Here I have the definition of an XmlNode which is a property (PayPreference) on my Customer class containing an enum describing how the customer will pay. <PayPerference...
5
by: Mahesh Devjibhai Dhola | last post by:
Hi All, I want to make a custom class in c#, which extends System.Xml.XmlNode class of BCL. Now in custom class, I have implement abstract methods of XmlNode class also. Now when I am trying to...
5
by: GaryDean | last post by:
I have a web service method that returns an XMLDocument. The signature is: public XmlDocument GetPOs() The following client code calls this method but it accepts an XMLNode instead of an...
4
by: CSharper | last post by:
I am reading an XmlFile using XmlDocument and traverse through the XmlNode, as I read I need to append an attribute to the XmlNode on some conditions. I tried xmlNode.Attributes.Append() It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.