ilinsky / jquery-xpath

jQuery XPath plugin (with full XPath 2.0 language support)
180 stars 64 forks source link

Dot in XML name #17

Closed raffazizzi closed 8 years ago

raffazizzi commented 8 years ago

Parsing an XPath expression with an attribute name containing a dot returns Uncaught Error: Unexpected token beyond end of query.

For example:

xml_element.xpath("@meter.count");

Plain jquery attr() works correctly:

xml_element.attr("meter.count");

Dots are allowed as part of an XML Name, just not at the beginning, so the expression parser should allow them.

The same issue applies to element names.

ilinsky commented 8 years ago

Fixed in ilinsky/xpath.js@ac494f675c5693e6803c3a502d0cdbf7fe859a1f