Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2002-2010 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.integration.xml.selector;
Boolean XPath testing org.springframework.integration.core.MessageSelector. Requires an XPathExpression which can be evaluated using org.springframework.xml.xpath.XPathExpression.evaluateAsBoolean(org.w3c.dom.Node). Supports payloads of type org.w3c.dom.Document or java.lang.String.

Author(s):
Jonas Partner
Create a boolean testing XPath org.springframework.integration.core.MessageSelector supporting multiple namespaces.

Parameters:
expression XPath expression as a String
namespaces Map of namespaces where the keys are namespace prefixes
	public BooleanTestXPathMessageSelector(String expressionMap<StringStringnamespaces) {
		super(expressionnamespaces);
	}

Create a boolean testing XPath org.springframework.integration.core.MessageSelector supporting a single namespace.

Parameters:
expression XPath expression as a String
prefix namespace prefix
namespace namespace URI
	public BooleanTestXPathMessageSelector(String expressionString prefixString namespace) {
		super(expressionprefixnamespace);
	}

Create a boolean testing XPath org.springframework.integration.core.MessageSelector with no namespace support.

Parameters:
expression XPath expression as a String
	public BooleanTestXPathMessageSelector(String expression) {
		super(expression);
	}

Create a boolean testing XPath org.springframework.integration.core.MessageSelector using the provided org.springframework.xml.xpath.XPathExpression.

Parameters:
expression XPath expression
		super(expression);
	}


Return true if the org.springframework.xml.xpath.XPathExpression evaluates to true
	public boolean accept(Message<?> message) {
		Node node = getConverter().convertToNode(message.getPayload());
	}
New to GrepCode? Check out our FAQ X