You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jody Brooks <br...@gene.com> on 2005/12/20 21:52:50 UTC
Betwixt: successfully finding both elements and attributes but not within the same element
In other words, for this bit of xml "<Name DownloadURL="A">B</Name>" I can
grab A or B but not both.
At least, that is what I'm encountering with the .betwixt config below. I
can successfully toggle it to grab either value but not both.
Any ideas?
Jody
<?xml version='1.0' encoding='UTF-8' ?>
<info>
<element name='SearchResult'>
<element name='Location'>
<attribute name='ServerName'
property='hostanddomain'/>
</element>
<element name='Name' property='filename'>
<attribute name='DownloadURL'
property='downloaduri'/>
</element>
<element name='ObjectDate' property='publishdate'/>
<element name='ObjectSize' property='filesize'/>
<element name='Summary' property='description'/>
<element name='Score'/>
</element>
</info>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: Betwixt: successfully finding both elements and attributes but not within the same element
Posted by Thomas Dudziak <to...@gmail.com>.
On 12/20/05, Jody Brooks <br...@gene.com> wrote:
> In other words, for this bit of xml "<Name DownloadURL="A">B</Name>" I can
> grab A or B but not both.
>
> At least, that is what I'm encountering with the .betwixt config below. I
> can successfully toggle it to grab either value but not both.
Think you need a <text> element for B. See
http://jakarta.apache.org/commons/betwixt/guide/binding.html
in Section "Using .betwixt files To Read And Write Mixed Content".
There are also some samples in betwixt's unit tests.
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org