You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by "Saha, Sanjeev" <SS...@asce.org> on 2004/05/26 05:46:50 UTC

Navigation using XmlCursor

for an xml-tag <name /> where name is defined with a default value say 'John Doe' in the schema definition:

if xc.currentTokenType() is START, indicating a start tag for 'name', and xc.getObject().SchemaType() points to the type of the contents of the element, in this case 'String@http://www.w3.org/2001/XMLSchema', how does one go about retriving the default value of 'John Doe' for the <name> element?

After the START tag is recognised, if I do a xc.getObject().SchemaType().getElementProperties(), it returns a ScemaProperty[] with length zero because the XmlObject points to the contents of <name> and not to the element itself. Is this the right approach?

-Sanjeev

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/