0 Replies Latest reply on Aug 5, 2012 2:29 AM by 953910

    Building XML by given XPath(s) and POJO with values.


      Need suggestions and input on solving the following problem dealing with JAVA and XML.

      1.) I have POJO with values that needs to be written to XML (Its big XML with a defined schema - xsd) - We currently employ XMLBeans for most XML processing.

      2.) We have been given XPaths for XML and for each XPath, we have been given either of three things - hard coded value, direct value mapped from POJO or some business logic applied to attributes of POJO to derive a value.

      3.) Now we need to construct XML from these XPaths and evaluated XML values.

      4.) Design Parameters - We have more than 400 XPaths and the logic encapsulates from simple if condition to complex enrichment logic.

      XPaths is typically used for query and XMLBeans does not provide a convenient way to use XPaths to create desired XML.

      Whats the best way to achieve this requirement? I am free to choose any technology (dom4j, etc). Need inputs please.