cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jani Kaarnalehto <kaarnale-coc...@majorus.fi>
Subject Parsing XML from text
Date Thu, 06 Feb 2003 10:55:03 GMT

Hey all,

I'm developing a content management system with cocoon and torque. (I will 
make it public as open source, when I get version 0.0 ready.) 

I have a problem with parsing text from database in to a XML-document.

My app stores (X)HTML as XML into a relational database. I store only 
elements not full XML-documents. Here is an example:

----

<document-body>
   <content>
      <h1>Sample page</h1>
      <p>This is text with an entity: &nbsp;</p>
   </content>
</document-body>

----

I'm using dom4j for handling XML inside my app.

I use DocumentHelper.parseText()-method for creating XML-document. But
like in the example there might be entities in the text (&nbsp; &auml;
etc.) The result is an exception complaining about missing entity
declarations.

It seems that dom4j isn't suitable for my needs after all and noe I'm 
seeking alternatives.

Is there an api for doing this build inside Cocoon? 
Any other suggestions?

Thanks for reading this far...

-Jani



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message