@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { ComplexDataType cd = (ComplexDataType) super.parse(instance, node, value); // handle non xml content as well if(cd.getData().size() == 0) { cd.getData().add(instance.getText().toString()); } return cd; } }
@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { ComplexDataType cd = (ComplexDataType) super.parse(instance, node, value); // handle non xml content as well if (cd.getData().size() == 0) { cd.getData().add(instance.getText().toString()); } return cd; } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { NativeType nativ = wfsfactory.createNativeType(); // <xsd:attribute name="vendorId" type="xsd:string" use="required"> nativ.setVendorId((String) node.getAttributeValue("vendorId")); // <xsd:attribute name="safeToIgnore" type="xsd:boolean" use="required"> nativ.setSafeToIgnore(((Boolean) node.getAttributeValue("safeToIgnore")).booleanValue()); // <xsd:any processContents="lax" namespace="##other" minOccurs="0"/> if (instance.getText() != null && instance.getText().length() != 0) { nativ.setValue(instance.getText()); } return nativ; } }
/** * <!-- begin-user-doc --> * Even though the spec allows an instance of ParamterValueType to have * multiple expressions as children, it is more often that there is only * one. Therefore this binding returns the first expression it finds or * null. If a subtype needs multiple expressions they should ovveride. * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { //first look for an expresion in the child text String text = instance.getText(); if ((text != null) && !"".equals(text)) { return filterFactory.createLiteralExpression(text); } for (Iterator itr = node.getChildren().iterator(); itr.hasNext();) { Node child = (Node) itr.next(); if (child.getValue() instanceof Expression) { return child.getValue(); } } return null; } }
@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { CssParameter option = new CssParameter((String) node.getAttributeValue("name")); option.setExpression(filterFactory.literal(instance.getText())); return option; } }
String text = instance.getText();
String text = instance.getText();