Hpricot strangeness

Hi,

Has anyone noticed the following gotcha/bug(?) with empty xml tags in
hpricot: doc = Hpricot("<div><foo/><span>aaaa</span></div>") ;
doc.at("foo") => {elem <foo> {elem <span> "aaaa" </span>}} versus =>
{emptyelem <foo>} for <foo></foo>

How to get around that?

thank you!
david

···

--
Posted via http://www.ruby-forum.com/.

Has anyone noticed the following gotcha/bug(?) with empty xml tags in
hpricot: doc = Hpricot("<div><foo/><span>aaaa</span></div>") ;
doc.at("foo") => {elem <foo> {elem <span> "aaaa" </span>}} versus =>
{emptyelem <foo>} for <foo></foo>

How to get around that?

http://code.whytheluckystiff.net/hpricot/wiki/HpricotXML

thank you!
david

--Greg

···

On Wed, Feb 13, 2008 at 12:40:32AM +0900, D. Krmpotic wrote:

Great, thanx.. I did find this before, but somehow it didn't work at the
first try. I did something wrong I guess. thank you again

Gregory Seidman wrote:

···

On Wed, Feb 13, 2008 at 12:40:32AM +0900, D. Krmpotic wrote:

Has anyone noticed the following gotcha/bug(?) with empty xml tags in
hpricot: doc = Hpricot("<div><foo/><span>aaaa</span></div>") ;
doc.at("foo") => {elem <foo> {elem <span> "aaaa" </span>}} versus =>
{emptyelem <foo>} for <foo></foo>

How to get around that?

http://code.whytheluckystiff.net/hpricot/wiki/HpricotXML

thank you!
david

--Greg

--
Posted via http://www.ruby-forum.com/\.