Hello, and sorry for the confusing subject.

I'm using my own DocumentFactory so that certain elements are mapped
to my own classes. For the most part I have a 1:1 mapping between
element types and classes. However, for a particular element I'd like
multiple classes depending on a particular attribute value, e.g.:

 Element      ==> Class
 <a>          --> A
 <b>          --> B
 <c type="x"> --> X extends C
 <c type="y"> --> Y extends C
 <c type="z"> --> Z extends C

The problem is that during DocumentFactory.createElement you don't
know what the attributes are yet. Is there a relatively clean way to
do this short of transforming the document before parsing?

Thanks,
Chris

_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to