I have a block of html code which represents the second verse of the book of James from the bible:
</span>
</span>
<span class="verse v2" data-usfm="JAS.1.2">
<span class="label">2</span>
<span class="content"> </span>
<span class="note x">
<span class="label">#</span>
<span class=" body"> See Matt. 5:12 </span>
</span>
<span class="content">Count it all joy, my brothers,</span>
<span class="note f">
<span class="label">#</span>
<span class=" body">
<span class="fr">1:2 </span>
<span class="ft">Or </span>
<span class="fq">brothers and sisters</span>
<span class="ft">. In New Testament usage, depending on the context, the plural Greek word </span>
<span class="fq">adelphoi </span>
<span class="ft">(translated “brothers”) may refer either to </span>
<span class="fq">brothers </span>
<span class="ft">or to </span>
<span class="fq">brothers and sisters</span>
<span class="ft">; also verses 16, 19</span>
</span>
</span>
<span class="content"> when you meet trials </span>
<span class="note x">
<span class="label">#</span>
<span class=" body">1 Pet. 1:6</span>
</span>
<span class="content">of various kinds, </span>
</span>
<span class="verse v3" data-usfm="JAS.1.3">
<span class="label">3</span>
<span class="content">for you know that </span>
<span class="note x">
<span class="label">#</span>
<span class=" body">1 Pet. 1:7 </span>
</span>
<span class="content">the testing of your faith </span>
<span class="note x">
<span class="label">#</span>
<span class=" body">Rom. 5:3; [ch. 5:11; Heb. 10:36; 2 Pet. 1:6]</span>
</span>
<span class="content">produces steadfastness. </span>
I ultimately just want to return the verse numbers and text as a string.I am trying to use CsQuery to retrieve certain span classes, so I can omit the classes I do not need. For example to return the class "content" and class "body" as a string. I can currently only display one span class, with the following code:
CQ dom = CQ.Create(text);
dom = dom["span.content"];
string cleanedText = dom.Text();
Console.WriteLine(cleanedText);
Any help would be greatly appreciated