All, I have an XML document that's subject to change fairly often, as it's going to be used in a simple message router. The message format will look something like what's included below. There's a repeating element called MsgParts that has an attribute for identifying the type of message contained inside, but I don't want to actually unmarshall the contents of the tag. I want to save the XML inside each MsgParts tag as a String (the crux of the problem). It's just going to get passed off to one or many destinations, and outside of creating a CDATA and putting XML inside (which cries "Hack!" to me), I can't figure out a way to do this with JiBX. And since it's possible the MsgParts contents will change fairly often, I don't want to re-compile/re-deploy the binding information each time we add a new type; I have a database config of where/how types should get to their destination but don't really care what's in the string I send. The ideal solution will create a new MsgPart object (see below) and populate the fields in the class appropriately. Any ideas? (Was that clear?)
Thanks. Dave Feltenberger <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE RouterMsg SYSTEM > <RouterMsg> <header>blahblah -- stuff won't change in here</header> <MsgParts type="test"> <!-- subject to change fairly often and not necessary to unmarshall --> <test> <davetest>asdfasdf</davetest> </test> </MsgParts> <MsgParts type="stuff"> <xyz> <fjfjf>asdf;lkjsdf</fjfjf> </xyz> </MsgParts> </RouterMsg> public class MsgPart { private String type = null; private String xmlContents = null; // getters and setters... } "The sender believes that this E-mail and any attachments were free of any harmful and malicious code or defects when sent. This message and its attachments could have been infected during transmission. By reading the message and opening any attachments, the recipient accepts full responsibility for taking protective and remedial action regarding the code or such defects. The sender is not liable for any loss or damage arising in any way from this message or its attachments." ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users