Mike Kienenberger <mkienen..laska.net> wrote:
> 2) I am having problems parsing a text tag in the xml file. Each
datasource
> element can have an optional <description> child element (and maybe other
> elements) which I just need to ignore. Originally I thought I could just
> ignore the information I wasn't using. When that didn't work, I tried
> adding a DefaultHandler instance for children. When that failed, I
created
> an IgnoreNestedElementsHandler which is really just a nested
DefaultHandler.
> However, I get an error that the text between <description> tags is
> unexpected. Removing all text between <description> and </description>
> causes everything to work perfectly, but I can't really do this outside of
> my own test environment. There's nothing special about the xml as far as
I
> can tell. I looked at the source for MapLoader which handles similar
> nested text elements (for example, db-generator-type), and I see no
special
> treatment being done there. However, since my total SAX experience is
with
> modifying Cayenne code, maybe I'm missing something fundamental somewhere.
Don't you hate it when you work on something for hours, finally send out a
message to the mailing list, then figure out the problem? Of course, it's
worse if you never figure it out. :)
Yes, I was missing something fundamental. <description> content is handled
at the <datasource> level, not at the <description> level.
As far as I can tell from my current testing, this is now a functional piece
of code.
-Mike
This archive was generated by hypermail 2.0.0 : Tue Jul 27 2004 - 20:08:13 EDT