Falk Langhammer wrote:

Thomas Jones-Low wrote:

The HTML code is stored in the application in a javax.swing.text.html.HTMLDocument class. I created a HTMLListMapper.java class to map the HTML to XML to (un)Marshal the code. Here is the Marshaller.


Hi Thomas,

I suspect You are on a wrong path.

        I suspect you may be correct. I'll try the more obvious approach.

javax.swing.text.html.HTMLDocument will give You HTML markup as a string and this is easy to marshal and unmarshall using JIBX (will do all the escaping for you). Note that html is NOT xml and I guess there aren't other options. Any attempt to embedd html into any xml would yield a non well-formed document and JIBX must refuse to parse it.

Concerning XHTML, You could use Dennis' DomElementMapper and try to construct an javax.swing.text.html.HTMLDocument from an Element. However, I guess this isn't easy with out-of-the-box classes.


A modified unmarhaller from DomElementMapper works ok for the this, but you do need to write this yourself.


Just pass the html string to your middle ware (as a string), and transform it to XHTML (e.g., using a conversion tool) there for further processing. Getting back the html string is easy (e.g., use xalan).


Bye, Falk


--
        Thomas Jones-Low            Softstart Services Inc.
        [EMAIL PROTECTED]      JobScheduler for Oracle
        Ph: 802-398-1012            http://www.softstart.com



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to