Modify

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)

auto_xml_type.patch (11.2 KB ) - added by ToeBee 10 years ago.

Download all attachments as: .zip

Change History (3)

by ToeBee, 10 years ago

Attachment: auto_xml_type.patch added

comment:1 by Don-vip, 10 years ago

Milestone: 14.08

comment:2 by Don-vip, 10 years ago

Resolution: fixed
Status: newclosed

In 7474/josm:

fix #10445 - Allow NoteReader to automatically determine XML style being parsed (patch by ToeBee)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.