Search code examples
javaxmlxstream

parsing XML to java using xstream


I am trying to parse xml to java classes, can any one help me. Thank you.

<?xml version="1.0" encoding="utf-8"?>
<patterns>
<pattern if="menuCondition">
    <input>Menu</input>
    <output>
        <command if="taxCondition">Company</command>
        <command>Tax</command>
        <command>Customer</command>
        <command>Vendor</command>
        <command>Banking</command>
        <command>Reports</command>
        <command>Settings</command>
        <command>Logout</command>
    </output>
</pattern>
</patterns>

Solution

  • Please have a look at this SO question. It has an armada of good answers on Java and XML.