Turn Nokogiri XML object to string without using .text

Awebvodp

New Member
I have an object which is a child of a \[code\]< td >\[/code\] tag. The class is \[code\]ctext\[/code\] and the relevant data is within the \[code\]< b >\[/code\] tag.tagI have selected the node using:\[code\]td.css(".ctext b")\[/code\]and it seems to work. I get a result of something like:\[code\]< b >Flying< br >< br >At the beginning of each combat, choose first strike, vigilance, or lifelink. Creatures you control gain that ability until end of turn.< /b >\[/code\]If I use:\[code\]td.css(".ctext b").text\[/code\]to convert it to a string, I get:\[code\]FlyingAt the beginning of each combat, choose first strike, vigilance, or lifelink. Creatures you control gain that ability until end of turn.\[/code\]What I need is to be able to convert the \[code\]td.css(".ctext b")\[/code\], which I think is a Nokogiri xml node to string without stripping the HTML tags. I need to keep the \[code\]< br >\[/code\]s.
 
Top