Announcement Announcement Module
Collapse
No announcement yet.
create java classes from xml file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • create java classes from xml file

    hi all

    i have to read a xml file with spring integration, parse it and then work with the content. is there an easy way to genereate java classes from an xml file with a spring integration component?

    regards
    angela

  • #2
    JAXB, JiBX, Castor, XmlBeans etc. . There are many libraries for that. However I am personally not convinced that this is always the right thing to do especially if you only need to look/process few values and do it only once and move on.
    Hav you look at XPath which gives you a very simply API to get what you need in one line of code no matter how deep its hidden in the XML hierarchy?
    With SpringIntegration we also have various XPath components (filters, routers, transformers etc.) to help you even more.

    Comment


    • #3
      thanks for the hints! i'll have a look

      Comment

      Working...
      X