Currently XmlBeans returns XmlAnyTypes if a XmlObject resides in an AlternateContent tag. Providing the schema for AlternateContent (thanks to Docx4J [1]) solves those errors and the correct xmltype is returned. [1] https://github.com/plutext/docx4j/blob/master/xsd/mce/markup-compatibility-2006-MINIMAL.xsd
applied via r1819690