You can not only get the element, but then you can also get
its location, with filename, line and column number (see the
org.apache.xmlbeans.XmlError class for an example of how to do
this)
And if you do elem.newCursor(), then you can use
.toParent() to build the path in a couple lines of code or navigate from it any
other way you wish.
Radu
From: Jinyuan Zhou [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 11:28 AM
To: [email protected]
Subject: how to find full path to the element on which velidation failed.
With Collected xmlerror objects, I can
only get the element name. some time it It would be
nice if there is a way
to get the full path to the troubled
element.
Thanks,
From: Rob Eger [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 29, 2006 2:33 PM
To: [email protected]
Subject: RE: elementFormDefault='qualified" and xmlText
Thanks,
Rob.
On Wed, 2006-03-29 at 09:35 -0800, Jinyuan Zhou wrote:
I dont' have this problem. but I passed an XmlOptions with a call to opts.setSaveSuggestedPrefixes(map) to specify my choices of prefix names.
I wonder if this will give you back the prefixes.
From: Martin Wegner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 29, 2006 9:25 AM
To: [email protected]
Subject: elementFormDefault='qualified" and xmlText
Greetings.
I have elementFormDefault="qualfied" in my schema. I am using XMLBeans 2.0. When I use the xmlText() method to serialize my XMLBeans object, the elements are not prefixed. XMLBeans correctly spits out the default namespace declaration, so it semanticaly valid XML. But I really need the elements to be prefixed directly (downstream clients are brain dead, what can you do?).
What am I missing? Thanks in advance.
--Marty
| Rob Eger Senior Software Engineer Local Matters, Inc. 1221 Auraria Parkway Denver, CO 80204 [EMAIL PROTECTED] www.localmatters.com O 303-572-1122 x203 F 303-572-1123 |
_______________________________________________________________________ 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.

