-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I am parsing XML from OpenStreetMap. It looks like this:
<tag k="highway" v="residential"/>
The parser chokes when parsing the "k" attribute.
I set up my rule as:
IRule wayTagRule=new DefaultRule(IRule.Type.ATTRIBUTE, "/osm/way/tag","k","v")
I get
com.thebuzzmedia.sjxp.XMLParserException: local name for rule looks to be missing for IRule: scamsoft.randomwalk.mapfetch.MapBuilder$4[type=ATTRIBUTE, locationPath=/osm/way/tag, attributeNames=k,v]
at com.thebuzzmedia.sjxp.XMLParser.doStartTag(XMLParser.java:714)
at com.thebuzzmedia.sjxp.XMLParser.doParse(XMLParser.java:579)
at com.thebuzzmedia.sjxp.XMLParser.parse(XMLParser.java:457)
at com.thebuzzmedia.sjxp.XMLParser.parse(XMLParser.java:297)
I think this is a simple "off by 1" error.
XMLParser.java at line 713 should be:
if (attrName.length() - startIndex <= 0)
throw new XMLParserException(
"local name for rule looks to be missing for IRule: "
+ rule);
I am using the current stable version (2.2)
Metadata
Metadata
Assignees
Labels
No labels