From: David Sainte-claire Date: 2009-12-01T03:43:20+09:00 Subject: Re: Odd puts behaviour with REXML John W Higgins wrote: > Morning David, > > On Mon, Nov 30, 2009 at 10:19 AM, David Sainte-claire < > dsainteclaire@gmail.com> wrote: > >> >> >> searched for, but here I get something like this when I loop through the >> to be just normal text to me. >> >> Anyone have any ideas? It looks like something that REXML is doing >> since it outputs the path to the element in the document Product --> >> Support but I don't have a clue where the _Link is coming from? >> >> > Rule one of anything like this is to remove each element from the XML > file > one by one and see which one is breaking you. In this case you will find > that it's the link element because you are using ampersands in the URL. > See > here > > http://www.w3.org/TR/xhtml1/guidelines.html#C_12 > > John Thanks for the help, in terms of how to narrow it down, but if I change my XPATH statement to look more like this: data.elements.each("product/profile/support/title"){|element| puts element.text } Where product is the root note, and I'm only pulling out the title element, I still get output that looks like this: ???Product_Support_Link_Title??? Can the link element be messing up my XPATH query even though I'm not looking at that element? -- Posted via http://www.ruby-forum.com/.