code: public static ObjectInspector getStandardJavaObjectInspectorFromTypeInfo(TypeInfo typeInfo, XmlProcessor xmlProcessor) {
          switch (typeInfo.getCategory()) {
              case PRIMITIVE: {
                  return PrimitiveObjectInspectorFactory.getPrimitiveJavaObjectInspector(((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory());
              }
              case LIST: {
                  ObjectInspector listElementObjectInspector = getStandardJavaObjectInspectorFromTypeInfo(((ListTypeInfo) typeInfo).getListElementTypeInfo(),
                      xmlProcessor);
                  return new XmlListObjectInspector(listElementObjectInspector, xmlProcessor);
              }
              case MAP: {
                  MapTypeInfo mapTypeInfo = (MapTypeInfo) typeInfo;
                  ObjectInspector mapKeyObjectInspector = getStandardJavaObjectInspectorFromTypeInfo(mapTypeInfo.getMapKeyTypeInfo(),
                      xmlProcessor);
                  ObjectInspector mapValueObjectInspector = getStandardJavaObjectInspectorFromTypeInfo(mapTypeInfo.getMapValueTypeInfo(),
                      xmlProcessor);
                  return new XmlMapObjectInspector(mapKeyObjectInspector, mapValueObjectInspector, xmlProcessor);
              }
              case STRUCT: {
                  StructTypeInfo structTypeInfo = (StructTypeInfo) typeInfo;
                  List<String> structFieldNames = structTypeInfo.getAllStructFieldNames();
                  List<TypeInfo> fieldTypeInfos = structTypeInfo.getAllStructFieldTypeInfos();
                  List<ObjectInspector> structFieldObjectInspectors = new ArrayList<ObjectInspector>(fieldTypeInfos.size());
                  for (int fieldIndex = 0; fieldIndex < fieldTypeInfos.size(); ++fieldIndex) {
                      structFieldObjectInspectors.add(getStandardJavaObjectInspectorFromTypeInfo(fieldTypeInfos.get(fieldIndex), xmlProcessor));
                  }
                  return getStandardStructObjectInspector(structFieldNames, structFieldObjectInspectors, xmlProcessor);
              }
              default: {
                  throw new IllegalStateException();
              }
          }
      }
docs: Returns the standard java object inspector
  
  @param typeInfo
  the type info
  @param xmlProcessor
  the XML processor
  @return the standard java object inspector