public static Node [ ] toNodeArray ( Document doc , Object o , short type ) throws PageException { if ( Node . TEXT_NODE == type ) toTextArray ( doc , o ) ; else if ( Node . ATTRIBUTE_NODE == type ) toAttrArray ( doc , o ) ; else if ( Node . COMMENT_NODE == type ) toCommentArray ( doc , o ) ; else if ( Node . ELEMENT_NODE == type ) toElementArray ( doc , o ) ; throw new ExpressionException ( "invalid node type definition" ) ; }
casts a value to a XML Object Array defined by type parameter