What do you mean by "hard coded path 'variables' "??? The expression has no
The quotes were missing, that's all. that would return an XmlAttribute node.
And I certainly don't get everything you say below that sentence... maybe
"name" <nospam@user.com> wrote in message
news:ebuzOxppDHA.2416@TK2MSFTNGP10.phx.gbl...
> You have 3 hard coded path 'variables' in your post.
>
>
> What is this standardized (ly) supposed to mean?
>
> ==============
>
>
> You are an MS love child ?
>
> ---------
>
> 'castable,key' ==== never
>
>
> +++++++
>
> Any furry animal be anywhere earlier.
>
> simply by natural evolution.
>
> ======
>
> Be good to Ms, buy some more of their wonders.
>
> ____
>
> Anyway my thumb up to you.
>
>
>
>
>
> "Daniel Cazzulino" <dcazzulino@users.sf.net> wrote in message
> news:%23%234FeEWpDHA.2848@TK2MSFTNGP10.phx.gbl...
> > Yup, Peter's right. To further understand it, you could write an XPath
> > expression like the following:
> >
> > this.xml.SelectSingleNode(//configuration/appSettings/add/@key);
> >
> > Where the result wouldn't be "castable" to XmlElement altogether, as it
> > would return the key ("myKey") attribute of hte section:
> >
> > <configuration>
> > <appSettings>
> > <add key="myKey" value="myValue"/>
> >
> >
> >
> > "Peter Rilling" <peter@nospam.rilling.net> wrote in message
> > news:%23LYT3acjDHA.1096@TK2MSFTNGP11.phx.gbl...
> > > But as for the difference between the two, a node is more general then
> an
> > > element. Anything in an XML document is a node (e.g. attributes,
> > comments,
> > > doctype, etc), but only tags are elements.
> > >
> > > This error is not specific to XML conversions but .NET cannot
implicitly
> > > down-cast a variable. That is why you need to specify the cast
yourself
> > > since SelectSingleNode returns an XmlNode object.
> > >
> > > "Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
> > > news:e7Q3XKSjDHA.2592@TK2MSFTNGP10.phx.gbl...
> > > > Pluto wrote:
> > > >
> > > > > What is the difference between XmlNode and XmlElement?
> > > > The same as between fruit and apple. XmlElement is particular type
of
> > > > XmlNode.
> > > >
> > > > > this.appSettingsElement =
> > > > > this.xml.SelectSingleNode("//configuration/appSettings");
> > > > >
> > > > > Error: Cannot implicitly convert type 'System.Xml.XmlNode' to
> > > > > 'System.Xml.XmlElement'
> > > >
> > > > So convert it explicitly:
> > > > this.appSettingsElement =
> > > >
(XmlElement)this.xml.SelectSingleNode("//configuration/appSettings");
> > > >
> > > > --
> > > > Oleg Tkachenko
> > > >
http://www.tkachenko.com/blog > > > > Multiconn Technologies, Israel
> > > >
> > >
> > >
> >
> >
>