| Author |
Parsing XML (using the jakarta commons digester)
|
Katrina Owen
Sheriff
Joined: Nov 03, 2006
Posts: 1334
|
|
I've run into a snag with a file I am trying to parse. The file has approximately 700 entries, most of which have the following structure: Sometimes there will be multiple sections for a single root element, but overall, it follows that basic structure. There is a small subset of these, approximately 30, that have an extra layer, like so: For what I'm doing, I don't really need the distinguishing feature, I just want to get to the stuff it wraps. Would it be completely off the mark to define an additional structure in addition to the structure that is already defined, and which works for most of the cases? Or do I need to approach this in a conceptually different manner?
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Every time I've used that parser, I've made the Java Object model match the structure of the XML document. I'm not sure what the easiest way to skip a level would be.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Parsing XML (using the jakarta commons digester)
|
|
|