[OpenLayers-Dev] XML parsing, SLD parsing
tschaub at openplans.org
Mon Nov 5 12:18:49 EST 2007
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.
Andreas Hocevar wrote:
> On 11/3/07, Christopher Schmidt <crschmidt at metacarta.com> 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
> 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
> 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
> 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
> Bottom line: OpenLayers.Format.SLD now works reliably without using
> any XML functions from OpenLayers.Util. An updated patch is attached
> to #533.
> Dev mailing list
> Dev at openlayers.org
More information about the Dev