gautamdudeja90 / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 1 forks source link

Support for xpath expressions #110

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Giving that xml input:

<contactsInput>
    <contacts>
        <contact>
            <name>john</name>
            <surname>smith</surname>
            <fullName>John Smith</fullName>
                <items>
                            <item>myItem</item>
                        </items>
        </contact>      
    </contacts>
</contactsInput>

And that mapping:

<record name="contact" class="eu.com.company.camel.Contact">
                <field name="name"/>
                <field name="surname"/>
                <field name="fullName"/>
                <field xpath="/*/*/*/*[local-name()='items']" setter="setStringItems"/>
</record>

It would be nice to add support for xpath expression, to store xml portions in 
a string and save it without marshalling. 
In my use case I have to send the portion to a text indexing engine.

What is the expected output?

name="john"
surname="smith"
fullname="john smith"
stringItems="<items><item>myItem</item></items>"

Thank you

Original issue reported on code.google.com by emanuele...@gmail.com on 14 May 2014 at 1:09

GoogleCodeExporter commented 9 years ago

Original comment by kevin.s...@gmail.com on 27 Jul 2014 at 7:28