You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Danny Lin <Li...@doc.state.sc.us> on 2007/01/19 23:16:24 UTC

not able to retrieve attribute

I have an XML fragment that can be obtained by:
log.debug("Name information:\n"+theName);

"theName" is an object of class that extends
org.apache.xmlbeans.XmlObject

<xml-fragment personNameCommentText="A"
xmlns:ns6="http://jxdm.ws.doc.state.sc.us
<http://jxdm.ws.doc.state.sc.us> "
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
<http://www.w3.org/2003/05/soap-envelope> ">
  <ns6:PersonGivenName>Rebecca</ns6:PersonGivenName>
  <ns6:PersonMiddleName>Mace</ns6:PersonMiddleName>
  <ns6:PersonSurName>Smith</ns6:PersonSurName>

But when I call theName.getPersonNameCommentText() I get a null string.
How do I get around with this problem? Any help is appreciated.
 
My XMLBeans version is 2.2 that comes with Axis2 1.1.
 
Thanks.
 
Danny
 

RE: not able to retrieve attribute

Posted by lincoln zheng <li...@hotmail.com>.
Hi Lin,
The schema passing option can specify no comment, I don't the default 
setting, if it is set to be no comment, you can not get the comment
Best



>From: "Danny Lin" <Li...@doc.state.sc.us>
>Reply-To: user@xmlbeans.apache.org
>To: <us...@xmlbeans.apache.org>
>Subject: not able to retrieve attribute
>Date: Fri, 19 Jan 2007 17:16:24 -0500
>
>I have an XML fragment that can be obtained by:
>log.debug("Name information:\n"+theName);
>
>"theName" is an object of class that extends
>org.apache.xmlbeans.XmlObject
>
><xml-fragment personNameCommentText="A"
>xmlns:ns6="http://jxdm.ws.doc.state.sc.us
><http://jxdm.ws.doc.state.sc.us> "
>xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
><http://www.w3.org/2003/05/soap-envelope> ">
>   <ns6:PersonGivenName>Rebecca</ns6:PersonGivenName>
>   <ns6:PersonMiddleName>Mace</ns6:PersonMiddleName>
>   <ns6:PersonSurName>Smith</ns6:PersonSurName>
>
>But when I call theName.getPersonNameCommentText() I get a null string.
>How do I get around with this problem? Any help is appreciated.
>
>My XMLBeans version is 2.2 that comes with Axis2 1.1.
>
>Thanks.
>
>Danny
>

_________________________________________________________________
Free Alerts : Be smart - let your information find you ! 
http://alerts.live.com/Alerts/Default.aspx


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org