Affects Version/s: 1.1
Fix Version/s: None
Operating System: All
I have this problem when using Digester to parse my XML file.
Suppose we have the following XML structure:
The corresponding DTD structure would be:
<!ELEMENT parent (#PCDATA | child)*>
<!ELEMENT child (#PCDATA)>
I saw that the body() method of a Rule object is called only when the end
of the matching pattern is encountered, and that's why we can only retrieve
the "lastPart" portion of the <parent> element body, presented in the
Even more, in such a case, the body() method would receive "child2lastPart"
I think this is because we assumed that an element would never have split
body content like the one I constructed.
I propose a solution in witch to call the body() method of a rule
on characters() event of the matching element pattern,
rather than on endElement(), in order to be able to treat all the body chunks.
What do you think about this ?
|Field||Original Value||New Value|
|Affects Version/s||1.1 Final [ 12311809 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|