hi,

we're trying to implement castor and remove 2 or 3 various other
marshalling/unmarshalling technologies in a project.  One need we have
is to unmarshall a collection of 'content' objects - the root object
being of type TreeSet<Content>.

public class Content {
  public static enum Type {file, folder};
  Type type;
  String name;
  String desc;
  String uri;
  // plus getters/setters
}

<!-- current example of the XML to transform -->
<content-set>
  <file name="foo.xml" desc="description" uri="file://blah/foo.xml"/>
  <folder name="bar" desc="desc of bar" uri="./bar"/>
</content-set>

I have no idea if this is possible with castor, and I'm struggling to
find good examples of anything similar either.  Could anyone point me at
a reasonable doc/example?  Or tell me if what I'm doing is
impossible/close-to-impossible?

We can change the XML schema if it would help, but the TreeSet<Content>
would be harder to change.

Many thanks,

-- 
Darren Davison
Public Key: 0xE855B3EA

Attachment: signature.asc
Description: Digital signature

Reply via email to