@Nullable public static Block loadOneBlockFromXml(String xml,BlockFactory blockFactory) throws BlocklyParserException {
  List<Block> result=new ArrayList<>();
  loadBlocksFromXml(null,xml,blockFactory,null,result);
  if (result.isEmpty()) {
    return null;
  }
  return result.get(0);
}

@ Nullable public static Block loadOneBlockFromXml ( String xml , BlockFactory blockFactory ) throws BlocklyParserException { List < Block > result = new ArrayList < > ( ) ; loadBlocksFromXml ( null , xml , blockFactory , null , result ) ; if ( result . isEmpty ( ) ) { return null ; } return result . get ( 0 ) ; }
convenience function to load only one block .
