Announcement Announcement Module
No announcement yet.
Using XMLBeans objects as the model Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using XMLBeans objects as the model

    I am curious if anyone has tried using an XMLBeans-generated object as the model in conjunction with Spring-MVC.

    Just from a little research, I know it's a tricky matter. If I'm trying to bind HTML form data to a Person object, I really need to do something like this first:

    PersonDocument doc = PersonDocument.Factory.newInstance();
    Person person = doc.addNewPerson();

    And then use that Person as the form-backing object - but still keep a reference to the PersonDocument, since I need to generate XML using that object (the XML is then tossed into a MarkLogic database).

    Has anyone gone down this path and had any success with it? Would JAXB 2-generated code be any easier to do this with? We're also considering not having any Java object at all - just sending the HTML form data directly to an XQuery function that handles the data and generates the right XML document, then tosses it into MarkLogic.