You can solve your problem by using another parser, for instance the one that comes with Xerces. You can do this by putting the Xerces jar before the pull-parser jar in your classpath.
regards, Maarten
Matt schreef:
Hi there,
I appear to be having a problem with the size of a CDATA being parsed into a document from disk.
I'm getting a DocumentException: null Nested exception: null, and the only difference appears between a successful and non-successful parse is the length of the Content tag that contains CDATA.
Any clues as to why dom4j-1.5 and dom4j-1.5.2 will not parse the following :
<?xml version="1.0" encoding="ISO-8859-1" ?> <Notes>
<Note Status="New" Sent="24/02/2005 2:53:49 p.m." Received=""
File_Version="" ID="5" ServerID="66667777">
<Date Year="2005" Month="2" Day="24" DayOfWeek="4" Hour="14" Minute="53"
Second="49" /> <Originator>3</Originator> <Type>Message</Type> <Final /> <Author>Matt</Author> <Recipients>4;5</Recipients> <File_Name>If a shareholder ceases to work for Codex Computing for any
reason.doc</File_Name> <Document_Title>Moramdum of Understanding</Document_Title> <Content>
<![CDATA[ As it is not possible to guarantee the performance of the
accountant I feel it unwise to stipulate a time frame. If the company is
asking for the valuation it is in the companies best interest to expedite
this so I see no need for a time frame to be stipulated. I feel that second
or third valuations should be at the expense of the party requesting such so
as to discourage delay. Either we have faith in our accountants or we don't.
if not we should change. We could however say allow for the cost to be
split 50/50 if the average price would change by more than say 15% in the
favour of the requestor based on the subsequent valuation/s. I have
introduced a 3 month stand down period as it would be unreasonable to have
someone who is say ill being forced out when they will in all likelyhood
want back in upon recovery. I have one other concern, which I am not sure
of, that is the offering to the long term partner business. I am not saying
this is wrong, just that I am not sure that that is the correct way to deal
with this as it creates classes of shareholder. Also you would need to
define long term personal relationship.
]]> </Content>
<Excerpt>
<![CDATA[ If a shareholder ceases to work for Codex Computing for any
reason, including, but not limited to, relationship breakdown, termination
of employment by firing or redundancy, or ill health, for a period
]]> </Excerpt>
<KP_GUID>814BFD3FDC5843F0B6DC688C99E1C31E</KP_GUID> </Note>
</Notes>
But this will parse OK (Only difference is shortened CDATA in Content tag)
<?xml version="1.0" encoding="ISO-8859-1" ?> <Notes>
<Note Status="New" Sent="24/02/2005 2:53:49 p.m." Received=""
File_Version="" ID="5" ServerID="66667777">
<Date Year="2005" Month="2" Day="24" DayOfWeek="4" Hour="14" Minute="53"
Second="49" /> <Originator>3</Originator> <Type>Message</Type> <Final /> <Author>Matt</Author> <Recipients>4;5</Recipients> <File_Name>If a shareholder ceases to work for Codex Computing for any
reason.doc</File_Name> <Document_Title>Moramdum of Understanding</Document_Title> <Content>
<![CDATA[ As it is not possible to guarantee the performance of the
accountant I feel it unwise to stipulate a time frame. If the company is
asking for the valuation it is in the companies best interest to expedite
this so I see no need for a time frame to be stipulated. I feel that second
or third valuations should be at the expense of the party requesting such so
as to discourage delay. Either we have faith in our accountants or we don't.
if not we should change. We could however say allow for the cost to be
split 50/50 if the average price would change by more than say 15% in the
favour of the requestor based on the subsequent valuation/s. I have
introduced a 3 month stand down period as it would be unreasonable to have
someone who is say ill being forced out when they will in all likelyhood
want back in upon recovery. I have one other concern, which I am not sure
of, that is the offering to the long term partner business. I am not saying
this is wrong, just that I am not sure that that is the correct way to deal.
]]> </Content>
<Excerpt>
<![CDATA[ If a shareholder ceases to work for Codex Computing for any
reason, including, but not limited to, relationship breakdown, termination
of employment by firing or redundancy, or ill health, for a period
]]> </Excerpt>
<KP_GUID>814BFD3FDC5843F0B6DC688C99E1C31E</KP_GUID> </Note>
</Notes>
Any guidance would be greatly appreciated.
Matt Hall-Smith
New Zealand
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user