Ok, help me out here. Where does node.nodeValue fail?
I've tested in FF, IE (6/7), Opera (9.24). Is this only about Safari support (my safari machine is not available today)? If we need a nodeValue property just for safari, I'd suggest adding a method named nodeValue to the XML format. I like the idea of naming our cross-browser methods/properties after W3C ones where possible. Thanks for helping me see what I'm missing here. Tim Andreas Hocevar wrote: > Chris, > > On 11/3/07, Christopher Schmidt <[EMAIL PROTECTED]> wrote: >> On Sat, Nov 03, 2007 at 11:36:59PM +0100, Andreas Hocevar wrote: >>> I would propose to add another convenience method in >>> OpenLayers.Format.XML, called eg. getTextContent, which would be >>> node.textContent in a cross-browser manner. >> I'm in favor of that. Please create a ticket, attach a patch, and then >> mention in the SLD ticket that it depends on the new ticket you've >> created. > > Further investigation (ie. testing in Opera and Safari) brought me to > the conclusion that the effort of getting textContent in a > cross-browser manner is too small to justify a separate convenience > function: > > var textContent = node.text || node.textContent; > > When I proposed to create a separate convenience function, I was not > sure if the above would be sufficient to make it work in Opera and > Safari, but it definitely does (like it obviously also does in > OpenLayers.Util.getXmlNodeValue). > > So I just changed my code to use the above, and unless you or someone > else really really wants to have a convenience function for that, I do > not see any need to create a ticket and patch for adding this to > OpenLayers.Format.XML. > > Bottom line: OpenLayers.Format.SLD now works reliably without using > any XML functions from OpenLayers.Util. An updated patch is attached > to #533. > > Regards, > Andreas. > _______________________________________________ > Dev mailing list > [email protected] > http://openlayers.org/mailman/listinfo/dev > > !DSPAM:4033,472e4f5d109567082231907! > _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
