logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Preparsing XML Schema data types in Xerces-J: msg#00083

Subject: Re: Preparsing XML Schema data types in Xerces-J
My code made you cringe, didn't it?  I'll spare you the rest of it then... :-)

Thanks for the tip, that cleaned it up a lot.

I'm still new to Java and Xerces-J, it would have taken me a long time to make the connection that getName() would return a type value. That's what I get for being self-taught!

Thanks again!

--H

Hi Henry,

Instead of the following:

 String dataType = partTerm.getTypeDefinition().toString();

You should use the "getName()" method defined on the XSObject [1]:
partTerm.getTypeDefinition.getName()
partTerm.getTypeDefinition.getNamepspace()

This is the "right" way to query name via API.

[1]
http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-XSObject

Thank you,
--
Elena Litani / IBM Toronto


--


--Henry


<Prev in Thread] Current Thread [Next in Thread>