@ Override public MaybeNode get ( int index ) { if ( index == 0 ) { final OMElement first = element . getFirstElement ( ) ; return factory ( ) . newNode ( first , pathBuilder ( ) . withPart ( "any" ) . atIndex ( 0 ) ) ; } return NodeFactory . noneNode ( pathBuilder ( ) . atIndex ( index ) ) ; }
If index is 0 it will return the first child element else it returns the NONE_NODE .