Hi Jadiyo,
1) there is no "quick way" to find the xpath of an element, it should be fairly easy to construct it using XmlCursor or DOM. 2) There are a few ways to get to a namespace: a. From a type: Request.type.getName().getNamespaceURI(); b. From an xbean using it's type qname: request.schemaType().getName().getNamespaceURI(); c. Use the cursor to get to the element's qname: XmlCursor xc = request.newCursor(); xc.getName().getNamespaceURI(); Cezar ________________________________ From: jadiyo [mailto:[EMAIL PROTECTED] Sent: Friday, December 08, 2006 6:36 AM To: dev@xmlbeans.apache.org Subject: xPath and namespace Hi, Given the xml document below which has been parsed in to the correct java type: 1) how can I retrieve the xpath for the elements and 2) how can I establish the namespace used by the document, which in the case below is urn1 AppHdr appHdr = AppHdr.Factory.parse("the xml document shown below"); The AppHdr MessageRef 2006-04-18T16:04:55.739+01:00 Thanks in advance Jadiyo ________________________________ View this message in context: xPath and namespace <http://www.nabble.com/xPath-and-namespace-tf2780412.html#a7757020> Sent from the Xml Beans - Dev <http://www.nabble.com/Xml-Beans---Dev-f348.html> mailing list archive at Nabble.com. _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.