You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Radu Preotiuc-Pietro <ra...@bea.com> on 2006/04/04 00:11:33 UTC

RE: how to find full path to the element on which velidation failed.

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:jzhou@5square.com] 
Sent: Thursday, March 30, 2006 11:28 AM
To: user@xmlbeans.apache.org
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:reger@localmatters.com] 
Sent: Wednesday, March 29, 2006 2:33 PM
To: user@xmlbeans.apache.org
Subject: RE: elementFormDefault='qualified" and xmlText


I sort of have the opposite problem:  I don't want xmlText() to give me
any prefixes or namespace declarations (I just want the raw xml for the
element).  Anyone know how to accomplish this?  I've tried a few things
with XmlOptions, but no luck so far.

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:marty_wegner@yahoo.com] 
	Sent: Wednesday, March 29, 2006 9:25 AM
	To: user@xmlbeans.apache.org
	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
reger@localmatters.com
www.localmatters.com <BLOCKED::http://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.