code: 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());
     }
docs: Parse workmanager element
  @param reader The reader
  @return The value
  @exception XMLStreamException XMLStreamException
  @exception ParserException ParserException
  @exception ValidateException ValidateException