*/
public Object parse(ElementInstance instance, Node node, Object value)
throws Exception {
//TODO: much of this method is duplicated in the 1.1.0 binding, it
// would be nice if we could sync them up somewhow....
PropertyType property = wfsfactory.createPropertyType();
//<xsd:element name="Name" type="xsd:QName">
property.setName((QName) node.getChildValue(QName.class));
//<xsd:element minOccurs="0" name="Value">
if (node.hasChild("Value")) {
Object object = node.getChildValue("Value");
//check for a map
if (object instanceof Map) {
Map map = (Map) object;
//this means a complex element parsed by xs:AnyType binding
// try to pull out some text
if (!map.isEmpty()) {
//first check for some text
if (map.containsKey(null)) {
property.setValue(map.get(null));
} else {
//perhaps some other value
property.setValue(map.values().iterator().next());
}
}
} else {
property.setValue(object);
}
}
return property;
}