Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] MOXy: Variable interpolation of XML element values

Hallo,

I need variable interpolation in all of my XML element values, e.g. <test>${my.test} TEST</test> should be replaced by <test>a pretty cool TEST</test>, when there is a corresponding mapping.

I am using MOXy 2.6.2 and have tried the StreamReaderDelegate solution posted here: http://stackoverflow.com/questions/14455813/can-jaxb-resolve-system-properties

Unfortunately, this solution is not working. The methods getText or gelElementText of StreamReaderDelegate never get called. I have checked MOXy's code and came to the conclusion that getText is only called for elements annotated with @XmlCDATA.

An XmlAdapter implementation cannot be used because the variable mapping is extended by the user at runtime, which means that it has a state.

Has anybody an idea how to achieve variable interpolation of XML element values in MOXy?


Back to the top