I have a source XML file. and I provide a UI for users to pick the elements they want to include in the resulting XML. How the UI works is by loading the XSD file and presenting the elements in a checkbox tree. Users then can check the elements they need.
The UI works fine, but I need some advice/guidance on the back-end logic: Basically I want to "apply a filter" to the source xml, but
- how should I save the user's selection (in deliminator separated values or ??) and
- how should I apply this "filter" (maybe with XSLT)?
EDIT: The src xml structure looks like this:
<IDs>
<id1></id1>
<id2></id2>
...
</IDs>
<Traveler>
<name></name>
<email></email>
...
<Traveler>
<Segments>
<Segment i:type="Air">
<carrier></carrier>
...
</Segment>
<Segment i:type="Hotel">
<supplier></supplier>
...
</Segment>
</Segments>
<Notes>
...
</Notes>
EDIT2: All of these elements can be checked/unchecked to include in the resulting xml.