Opened 10 years ago
Closed 10 years ago
#10445 closed enhancement (fixed)
[patch] Allow NoteReader to automatically determine XML style being parsed
Reported by: | ToeBee | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.08 |
Component: | Core | Version: | |
Keywords: | Cc: | ToeBee |
Description
This patch is a change to the NoteReader class I created a few days ago. It takes what was two different SAX handler classes and combines them into one which can determine on its own which style of XML is being parsed, based on the first element.
I didn't do it this way at first because it makes the handler a little more complicated. But today I was working on extending note support to various download functions and ran into problems because these other areas of JOSM had to know which style of XML was being parsed instead of just being able to say "here is a URL with note data. Parse it."
The added complexity is somewhat mitigated by the fact that the two different styles of XML do most of their work in different handler functions (startElement vs endElement) so things are still kind of separated.
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | auto_xml_type.patch added |
---|
comment:1 by , 10 years ago
Milestone: | → 14.08 |
---|
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In 7474/josm: