commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matthew.hawthorne" <>
Subject Re: Betwixt Configuration to process XML-formatted values
Date Tue, 23 Mar 2004 15:22:41 GMT
Nechiporenko, Maxim wrote:
> Thank you for your help. The issue I am having (or, at least, I am
> thinking this to be an issue) is that the Betwixt somehow escapes
> special characters in the values of elements. In my case, element <val>
> has a string value which happens to be an XML string
> "<![CDATA[<error>Some Error</error>]]". Betwixt replaced all "<", ">"
> with "&lt;" and "&gt;". I could, of course, run the result XML through
> something like commons-lang's StringExcapeUtils.unescapeXml() to get
> what I need, but why waste time on extra processing if there might be a
> way to configure Betwixt to simply ignore special characters in the
> first place. I would appreciate if you recall some of the details of how
> you tackled a similar issue in the past. 

It will take me some time to find the code that I used to solve this 
I'm on a different project now and I'll have to find the URL for the CVS 
repo, etc.

In the meanwhile, like I suggested in my last message, take a look at 
.betwixt files.
Try creating a (yourClassName).betwixt file in the same directory as 
your source and
generating the XML.

It should look something like this:

<?xml version="1.0" encoding="UTF-8" ?>
<info primitiveTypes="attribute">
      <element name='val' property='val'/>

Like I said, the answer is in there somewhere.  Take a look at the docs at and I think you'll be able to 
figure it out.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message