Wow - perfect! Thanks, Dean

On 8/31/05, Dean Fiala <[EMAIL PROTECTED]> wrote: 
> 
> Yes, if there are nodes within a node, .InnerText will return...
> 
> The InnerText, which will include the XML mark up used to define those
> nodes.
> 
> There is a way however to just get the text not inside of any child nodes.
> The text is actually in a node called #text.
> 
> The xpath expression to get it is text(), so to get the text portion of 
> your
> ChildNodes(1) would be...
> 
> Dim strValue as String = oNode.ChildNodes
> (1).SelectSingleNode("text()").Value
> 
> Of course, this will return nothing if there is no text, so you'll want to
> put a little logic around it.
> 
> 
> On 8/31/05, Eliezer Broder <[EMAIL PROTECTED]> wrote:
> >
> > I need to get a text value contained in a child node of this oNode:
> > Dim oNode As Xml.XmlNode
> >
> > The way I was attempting was:
> > Dim strValue as String = oNode.ChildNodes(1).InnerText
> >
> > That works *right now* - but I was told that if there would be child 
> nodes
> > within ChildNodes(1) - I'd end up getting XML markup mixed in that value
> > strValue - and I need just the plain text value.
> >
> > oNode.ChildNodes(1).Value = Nothing.
> >
> > *What's the best way to get the plain text value of this child node?*
> >
> > Thanks,
> > Eliezer
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> 
> 
> --
> Dean Fiala
> Very Practical Software, Inc
> http://www.vpsw.com
> 
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
>


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to