java - Get XSD type while SAXParser -


i trying parse xml document saxparser. have xsd document validates against. while parsing e.g. in startelement/endelement method know type xsd e.g. xsd:integer etc. possible?

thanks

mike

you can use attributes.getvalue(string qname) method on attributes object passed parameter in startelement method, value of of element's attributes including type: attributes.getvalue("type").

depending on if in xml using qualified names or not, might have use attributes.getvalue(i), i index of "type" attribute in element' attributes list. see https://stackoverflow.com/a/8451023/3132058 .

you can find more info on how use in sax api documentation.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -