Code example for Node

Methods: getParentNode

0
	public static final String ERROR_ID = "refElementRule";
 
	@Override 
	protected boolean supports(Node node) {
		return node instanceof Element && BeanDefinitionParserDelegate.REF_ELEMENT.equals(node.getNodeName())
				&& BeanDefinitionParserDelegate.PROPERTY_ELEMENT.equals(node.getParentNode().getNodeName());
	} 
 
	@Override 
	protected void validate(Node node, IXmlValidationContext context) {
		context.info(node, ERROR_ID, INFO_MESSAGE);
	} 
 
}