I am trying to implement a custom unmarshaller. Unfortunately I am
getting an AbstractError. I do not have a clue of how to fix this.
What am I missing?

I am trying to return the xml fragment that JiBX finds as a literal string.

public class GmlUnmarshaller implements IUnmarshaller, IAliasable {

        private String name;
        private String uri;
        private int index;
        
        public GmlUnmarshaller(String uri, int index, String name) {
                this.name = name;
                this.uri = uri;
                this.index = index;
        }
        
        public boolean isPresent(IUnmarshallingContext context) throws 
JiBXException {
                return context.isAt(uri, name);
        }

        public Object unmarshal(Object object, IUnmarshallingContext context)
                        throws JiBXException {
                
                UnmarshallingContext unmarshallingContext = 
(UnmarshallingContext)context;
                
                unmarshallingContext.parsePastStartTag(uri, name);
                Object value = unmarshallingContext.unmarshalElement();
                String result = (String)value;
                unmarshallingContext.parsePastEndTag(uri, name);
                
                return result;
        }
}

thanx,

-- 
Cheers,
Kees de Kooter
http://www.boplicity.net

-------------------------------------------------------------------------
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

Reply via email to