CSharpTest.Net
InnerText Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Html Namespace > XmlLightElement Class : InnerText Property

Glossary Item Box

Returns the inner text of this html element

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property InnerText As String
C# 
public string InnerText {get;}

Example

Library/Library.Test/TestHtmlParser.cs

C#Copy Code
XmlLightDocument doc = new HtmlLightDocument(document);
XmlLightElement e = doc.SelectSingleNode("/html/body");
Assert.AreEqual("this is > cdata! Hi, this is content.", Normalize(e.InnerText));
Assert.AreEqual("Hi", e.SelectSingleNode(".//div[@id='two']").InnerText);
Assert.AreEqual("this is > cdata!", Normalize(e.SelectSingleNode("text()").InnerText));
VB.NETCopy Code
Dim doc As XmlLightDocument = New HtmlLightDocument(document)
Dim e As XmlLightElement = doc.SelectSingleNode("/html/body")
Assert.AreEqual("this is > cdata! Hi, this is content.", Normalize(e.InnerText))
Assert.AreEqual("Hi", e.SelectSingleNode(".//div[@id='two']").InnerText)
Assert.AreEqual("this is > cdata!", Normalize(e.SelectSingleNode("text()").InnerText))

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys