add poly mode state parser to xml parser