src/main/java/org/eiichiro/bootleg/xml/XMLRequest.java
@Override
	protected Object convert(Object object, Class<?> type) {
		if (object instanceof Node) {
			Node node = (Node) object;
			NodeList nodes = node.getChildNodes();
			Text text = null;
			
			for (int i = 0; i < nodes.getLength(); i++) {
				Node child = nodes.item(i);
				
				if (child.getNodeType() == Node.TEXT_NODE) {
					text = (Text) child;
				}
			}
			
			if (text == null) {
				logger.warn("Parameter [" + object + "] cannot be converted to ["
						+ type + "]; Converted 'object' must have one child ["
						+ Text.class + "] node");
				return null;
			}
			
			return super.convert(text.getNodeValue(), type);
		} else {
			logger.warn("Parameter [" + object + "] cannot be converted to ["
					+ type + "]; Converted 'object' must be a ["
					+ Node.class + "]");
			return null;
		}
	}
@Override
	protected Object convert(Object object, Class<?> type) {
		if (object instanceof Node) {
			Node node = (Node) object;
			NodeList nodes = node.getChildNodes();
			Text text = null;
			
			for (int i = 0; i < nodes.getLength(); i++) {
				Node child = nodes.item(i);
				
				if (child.getNodeType() == Node.TEXT_NODE) {
					text = (Text) child;
				}
			}
			
			if (text == null) {
				logger.warn("Parameter [" + object + "] cannot be converted to ["
						+ type + "]; Converted 'object' must have one child ["
						+ Text.class + "] node");
				return null;
			}
			
			return super.convert(text.getNodeValue(), type);
		} else {
			logger.warn("Parameter [" + object + "] cannot be converted to ["
					+ type + "]; Converted 'object' must be a ["
					+ Node.class + "]");
			return null;
		}
	}
@ Override protected Object convert ( Object object , Class < ? > type ) { if ( object instanceof Node ) { Node node = ( Node ) object ; NodeList nodes = node . getChildNodes ( ) ; Text text = null ; for ( int i = 0 ; i < nodes . getLength ( ) ; i ++ ) { Node child = nodes . item ( i ) ; if ( child . getNodeType ( ) == Node . TEXT_NODE ) { text = ( Text ) child ; } } if ( text == null ) { logger . warn ( "Parameter [" + object + "] cannot be converted to [" + type + "]; Converted 'object' must have one child [" + Text . class + "] node" ) ; return null ; } return super . convert ( text . getNodeValue ( ) , type ) ; } else { logger . warn ( "Parameter [" + object + "] cannot be converted to [" + type + "]; Converted 'object' must be a [" + Node . class + "]" ) ; return null ; } }
Converts the specified object to the specified type.
The object to be converted must be a {@code Node} that has no child, or
this method return <code>null</code>.

@param object The object to be converted
@param type The type to which the specified object be converted.
@return The converted object.
Converts the specified object to the specified type . The object to be converted must be a { @code Node } that has no child or this method return <code > null< / code > .