@Override
    public <T> void handleUnknownField(int fieldNumber, Schema<T> schema) throws IOException
    {
        final String name = parser.getLocalName();
        while (true)
        {
            switch (next())
            {
                case END_ELEMENT:
                    if (name.equals(parser.getLocalName()))
                    {
                        // we can skip this unknown scalar field.
                        nextTag();
                        return;
                    }
                    throw new XmlInputException("Unknown field: " + name + " on message " +
                            schema.messageFullName());
                case END_DOCUMENT:
                    // malformed xml.
                case START_ELEMENT:
                    // message field
                    // we do not know how deep this message is
                    throw new XmlInputException("Unknown field: " + name + " on message " +
                            schema.messageFullName());
            }
        }
    }
An input used for reading data with xml format.

@author David Yu
@created May 24, 2010
protostuff-xml/src/main/java/io/protostuff/XmlInput.java