Re: [Simple-support] how to handle changing XML
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-07-03 05:44:24
|
Use this method Persister.read(MyClass.class, myXmlSource, false). This says ignore attributes and elements it does not understand. See documentation for more. --- On Tue, 14/6/11, Justin Morris <jm...@me...> wrote: From: Justin Morris <jm...@me...> Subject: [Simple-support] how to handle changing XML To: sim...@li... Received: Tuesday, 14 June, 2011, 7:28 AM I'm am using simple-xml to parse multiple feed sources. All have a very similar format but occasionally a feed provider will add a new node and that will break my parsing. Currently I just keep expanding my model to account for new nodes but this isn't sustainable. How can I tell simple xml to ignore nodes it doesn't recognize so that I stop getting "org.simpleframework.xml.core.ElementException: Element '?' does not have a match in class" errors? Any advice is appreciated. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |