In the 3.0 xsd the vault configuration and its options are part of the vault xsd.

@param reader the reader at the vault element
@param expectedNs the namespace
@return the vault configuration
763707
static VaultConfig readVaultElement_3_0(XMLExtendedStreamReader reader, Namespace expectedNs) throws XMLStreamException {
        final VaultConfig config = new VaultConfig();

        final int count = reader.getAttributeCount();
        for (int i = 0; i < count; i++) {
            final String value = reader.getAttributeValue(i);
            String name = reader.getAttributeLocalName(i);
            if (name.equals(CODE)){
                config.code = value;
            } else if (name.equals(MODULE)){
                config.module = value;
            } else {
                unexpectedVaultAttribute(reader.getAttributeLocalName(i), reader);
            }
        }
        if (config.code == null && config.module != null){
            throw new XMLStreamException("Attribute 'module' was specified without an attribute"
                    + " 'code' for element '" + VAULT + "' at " + reader.getLocation());
        }
        readVaultOptions(reader, config);
        return config;
    }
707106
public static MtasConfiguration readConfiguration(InputStream reader)
      throws IOException {
    MtasConfiguration currentConfig = null;
    // parse xml
    XMLInputFactory factory = XMLInputFactory.newInstance();
    try {
      XMLStreamReader streamReader = factory.createXMLStreamReader(reader);
      QName qname;
      try {
        int event = streamReader.getEventType();
        while (true) {
          switch (event) {
          case XMLStreamConstants.START_DOCUMENT:
            if (!streamReader.getCharacterEncodingScheme().equals("UTF-8")) {
              throw new IOException("XML not UTF-8 encoded");
            }
            break;
          case XMLStreamConstants.END_DOCUMENT:
          case XMLStreamConstants.SPACE:
            break;
          case XMLStreamConstants.START_ELEMENT:
            // get data
            qname = streamReader.getName();
            if (currentConfig == null) {
              if (qname.getLocalPart().equals("mtas")) {
                currentConfig = new MtasConfiguration();
              } else {
                throw new IOException("no Mtas Configuration");
              }
            } else {
              MtasConfiguration parentConfig = currentConfig;
              currentConfig = new MtasConfiguration();
              parentConfig.children.add(currentConfig);
              currentConfig.parent = parentConfig;
              currentConfig.name = qname.getLocalPart();
              for (int i = 0; i < streamReader.getAttributeCount(); i++) {
                currentConfig.attributes.put(
                    streamReader.getAttributeLocalName(i),
                    streamReader.getAttributeValue(i));
              }
            }
            break;
          case XMLStreamConstants.END_ELEMENT:
            if (currentConfig.parent == null) {
              return currentConfig;
            } else {
              currentConfig = currentConfig.parent;
            }
            break;
          case XMLStreamConstants.CHARACTERS:
            break;
          }
          if (!streamReader.hasNext()) {
            break;
          }
          event = streamReader.next();
        }
      } finally {
        streamReader.close();
      }
    } catch (XMLStreamException e) {
      log.debug(e);
    }
    return null;
  }
44911
public ResultMatcher isStringEqualTo(final String expected) {
        return new AbstractResultMatcher(path, configuration) {
            public void doMatch(Object actual) {
                isString(actual);
                Node node = getNode(actual);
                if (!node.asText().equals(expected)) {
                    failWithMessage("Node \"" + path + "\" is not equal to \"" + expected + "\".");
                }
            }
        };

    }
324640
@Override
    public void readExternal(PofReader reader)
            throws IOException {
        name = reader.readString(0);
        mutator = reader.readBoolean(1);
        args = reader.readObjectArray(2, new Object[0]);
    }
928280
public static NaryTreebank readTreesInPtbFormat(Reader reader) throws IOException {
        NaryTreebank trees = new NaryTreebank();
        while (true) {
            NaryTree tree = NaryTree.readTreeInPtbFormat(reader);
            if (tree != null) {
                tree.intern();
                trees.add(tree);
            }
            if (tree == null) {
                break;
            }
        }
        return trees;
    }
178116
public static JsonSchema createFromSource(final Reader reader) throws InvalidSchemaException, URISyntaxException {

		final Gson gson                      = new GsonBuilder().create();
		final Map<String, Object> rawData    = gson.fromJson(reader, Map.class);

		return StructrSchemaDefinition.initializeFromSource(rawData);
	}
449898
public static Analysis readAnalysis(final Reader reader) throws IOException {
        checkNotNull(reader);
        try {
            JAXBContext context = JAXBContext.newInstance(Analysis.class);
            Unmarshaller unmarshaller = context.createUnmarshaller();
            SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
            URL commonSchemaURL = SraReader.class.getResource("/org/nmdp/ngs/sra/xsd/SRA.common.xsd");
            URL analysisSchemaURL = SraReader.class.getResource("/org/nmdp/ngs/sra/xsd/SRA.analysis.xsd");
            Schema schema = schemaFactory.newSchema(new StreamSource[] { new StreamSource(commonSchemaURL.toString()), new StreamSource(analysisSchemaURL.toString()) });
            unmarshaller.setSchema(schema);
            return (Analysis) unmarshaller.unmarshal(reader);
        }
        catch (JAXBException | SAXException e) {
            throw new IOException("could not unmarshal Analysis", e);
        }
    }
859073
public static Config fromYAML(Reader reader) throws IOException {
        ConfigSupport support = new ConfigSupport();
        return support.fromYAML(reader, Config.class);
    }
1021717
@FFDCIgnore(XMLStreamException.class)
    public ConfigElement parseConfigElement(Reader reader) throws ConfigParserException {
        behaviorStack.add(MergeBehavior.MERGE);
        docLocationStack.add("Test Server");
        DepthAwareXMLStreamReader parser = null;
        try {
            parser = new DepthAwareXMLStreamReader(getXMLInputFactory().createXMLStreamReader(reader));
            ConfigElement configElement = null;
            int depth = parser.getDepth();
            while (parser.hasNext(depth)) {
                int event = parser.next();
                if (event == XMLStreamConstants.START_ELEMENT) {
                    configElement = parseConfigElement(parser, parser.getLocalName(), null, null, null, false);
                    break;
                }
            }
            parser.close();
            return configElement;
        } catch (IllegalArgumentException ex) {
            throw new ConfigParserException(ex);
        } catch (XMLStreamException e) {
            throw new ConfigParserException(e);
        }
    }
874901
public XmlWrapperParser createParser(Reader reader) {	    
        try {
			return new XmlWrapperParser(this, reader, getSupportedFormat());
		} catch (Exception e) {
			e.printStackTrace();
			throw new KriptonRuntimeException(e);
		}
	}
1361791
@FFDCIgnore({ XMLStreamException.class })
    public BaseConfiguration parseDefaultConfiguration(Reader reader, String docLocation) throws ConfigParserException, ConfigValidationException {
        try {
            XMLStreamReader parser = getXMLInputFactory().createXMLStreamReader(reader);
            BaseConfiguration config = new BaseConfiguration();
            if (!parseServerConfiguration(new DepthAwareXMLStreamReader(parser), docLocation, config, MergeBehavior.MERGE)) {
                config = null;
            }
            parser.close();
            return config;
        } catch (XMLStreamException e) {
            throw new ConfigParserException(e);
        }
    }
275652
protected function addIgnoredNames(AnnotationReader $reader)
    {
        foreach ($this->ignoredNames as $name) {
            $reader->addGlobalIgnoredName($name);
        }

        return $reader;
    }
874697
protected DsSecurity parseDsSecurity(XMLStreamReader reader) throws XMLStreamException, ParserException,
      ValidateException
   {

      String userName = null;
      String password = null;
      String securityDomain = null;
      Extension reauthPlugin = null;

      Map<String, String> expressions = new HashMap<String, String>();

      while (reader.hasNext())
      {
         switch (reader.nextTag())
         {
            case END_ELEMENT : {
               if (XML.ELEMENT_SECURITY.equals(reader.getLocalName()))
               {
                  return new DsSecurityImpl(userName, password, securityDomain, reauthPlugin,
                          !expressions.isEmpty() ? expressions : null);
               }
               else
               {
                  switch (reader.getLocalName())
                  {
                     case XML.ELEMENT_PASSWORD :
                     case XML.ELEMENT_USER_NAME :
                     case XML.ELEMENT_SECURITY_DOMAIN :
                     case XML.ELEMENT_REAUTH_PLUGIN :
                        break;
                     default :
                        throw new ParserException(bundle.unexpectedEndTag(reader.getLocalName()));
                  }
               }
               break;
            }
            case START_ELEMENT : {
               switch (reader.getLocalName())
               {
                  case XML.ELEMENT_PASSWORD : {
                     password = elementAsString(reader, XML.ELEMENT_PASSWORD, expressions);
                     break;
                  }
                  case XML.ELEMENT_USER_NAME : {
                     userName = elementAsString(reader, XML.ELEMENT_USER_NAME, expressions);
                     break;
                  }
                  case XML.ELEMENT_SECURITY_DOMAIN : {
                     securityDomain = elementAsString(reader, XML.ELEMENT_SECURITY_DOMAIN, expressions);
                     break;
                  }
                  case XML.ELEMENT_REAUTH_PLUGIN : {
                     reauthPlugin = parseExtension(reader, XML.ELEMENT_REAUTH_PLUGIN);
                     break;
                  }
                  default :
                     throw new ParserException(bundle.unexpectedElement(reader.getLocalName()));
               }
               break;
            }
         }
      }
      throw new ParserException(bundle.unexpectedEndOfDocument());
   }
1059498
public static String[] requireAttributes(final XMLExtendedStreamReader reader, final String... attributeNames)
            throws XMLStreamException {
        final int length = attributeNames.length;
        final String[] result = new String[length];
        for (int i = 0; i < length; i++) {
            final String name = attributeNames[i];
            final String value = reader.getAttributeValue(null, name);
            if (value == null) {
                throw missingRequired(reader, Collections.singleton(name));
            }
            result[i] = value;
        }
        return result;
    }
789721
public static NaaccrDictionary readDictionary(Reader reader) throws IOException {
        try {
            NaaccrDictionary dictionary = (NaaccrDictionary)instanciateXStream().fromXML(reader);

            // default value for specifications
            if (dictionary.getSpecificationVersion() == null)
                dictionary.setSpecificationVersion(SpecificationVersion.SPEC_1_0);

            // default value for record types
            if (dictionary.getItems() != null)
                for (NaaccrDictionaryItem item : dictionary.getItems())
                    if (item.getRecordTypes() == null)
                        item.setRecordTypes(NaaccrFormat.ALL_RECORD_TYPES);

            // let's not validate the internal dictionaries, we know they are valid
            String uri = dictionary.getDictionaryUri();
            if (uri == null || uri.trim().isEmpty())
                throw new IOException("'dictionaryUri' attribute is required");
            else if (!BASE_DICTIONARY_URI_PATTERN.matcher(uri).matches() && !DEFAULT_USER_DICTIONARY_URI_PATTERN.matcher(uri).matches()) {
                List<String> errors = validateUserDictionary(dictionary);
                if (!errors.isEmpty())
                    throw new IOException(errors.get(0));
            }

            return dictionary;
        }
        catch (XStreamException ex) {
            throw new IOException("Unable to read dictionary", ex);
        }
    }
434726
public Map<String, Val> nextMap(String expectedName) throws IOException {
      boolean ignoreObject = peek() != JsonTokenType.BEGIN_OBJECT && StringUtils.isNullOrBlank(expectedName);
      if (!ignoreObject) beginObject(expectedName);
      Map<String, Val> map = new HashMap<>();
      while (peek() != JsonTokenType.END_OBJECT && peek() != JsonTokenType.END_DOCUMENT) {
         Tuple2<String, Val> kv = nextKeyValue();
         map.put(kv.getKey(), kv.getValue());
      }
      if (!ignoreObject) endObject();
      return map;
   }
1098759
protected WorkManager parseWorkManager(XMLStreamReader reader) throws XMLStreamException, ParserException,
      ValidateException
   {
      WorkManagerSecurity security = null;

      while (reader.hasNext())
      {
         switch (reader.nextTag())
         {
            case END_ELEMENT : {
               if (CommonXML.ELEMENT_WORKMANAGER.equals(reader.getLocalName()))
               {
                  return new WorkManagerImpl(security);
               }
               else
               {
                  switch (reader.getLocalName())
                  {
                     case CommonXML.ELEMENT_SECURITY :
                        break;
                     default :
                        throw new ParserException(bundle.unexpectedEndTag(reader.getLocalName()));
                  }
               }
               break;
            }
            case START_ELEMENT : {
               switch (reader.getLocalName())
               {
                  case CommonXML.ELEMENT_SECURITY : {
                     security = parseWorkManagerSecurity(reader);
                     break;
                  }
                  default :
                     throw new ParserException(bundle.unexpectedElement(reader.getLocalName()));
               }
               break;
            }
         }
      }
      throw new ParserException(bundle.unexpectedEndOfDocument());
   }