Hi Robin,

It's not possible to do this, mostly because XML parsers don't support 
this type of operation. The parsers expect to handle the entire document 
as XML, and don't give any means of accessing the raw text. The closest 
you can come to this is to build a DOM model of the <document> content, 
then turn the resulting DOM into text (using something like an empty 
transform constructed with javax.xml.transform.TransformerFactory, with 
a DOMSource as input and a StreamResult as output).

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Robin M. Roos wrote:
> Hi Everyone
>
> Using jibx 1.2.1 I wish to create a binding that allows the 
> element <document> to be mapped to a String or StringBuffer 
> property of the enclosing element's Java class.
>
> <document> will contain zero or more sub elements of undefined 
> structure, but the content will be well-formed.  I'd like the 
> String or StringBuffer to become populates with the text 
> representation of this child element structure (excluding the 
> opening <document> and closing </document> tags).
>
> Is this possible?  I have made a few attempts but with no 
> success.
>
> Many thanks, Robin.
>   
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to