RE: Wrong namespace prefix in generated documents?

2014-07-31 Thread Duane Zamrok
The short answer is to use XmlOptions to configure the prefixes used in your XmlBeans output. Something like the following will cause it to use xxx for yyy:aaa:bbb:ccc. XmlBeans output is NOT tied to the prefixes you declare in your schema. HashMap ns = new HashMap(); ns.put(yyy:aaa:bbb:ccc,

RE: Problems getting started with xmlbeans

2010-11-22 Thread Duane Zamrok
Can you post the schema as well? Thanks -Duane From: PhilNad214 PhilNad214 [mailto:philnad...@gmail.com] Sent: Monday, November 22, 2010 12:17 AM To: user@xmlbeans.apache.org Subject: Re: Problems getting started with xmlbeans As a followup to this, here is an example: import

RE: Problems getting started with xmlbeans

2010-11-22 Thread Duane Zamrok
xs:element name=name type=xs:string/ xs:element name=per-ounce-rate type=xs:decimal/ /xs:sequence /xs:complexType /xs:schema On Tue, Nov 23, 2010 at 7:59 AM, Duane Zamrok zam...@cubrc.orgmailto:zam...@cubrc.org wrote: Can you post the schema as well? Thanks -Duane From

RE: Problems getting started with xmlbeans

2010-11-22 Thread Duane Zamrok
did a search of the XMLBeans site and could not find his name... On Tue, Nov 23, 2010 at 8:44 AM, Duane Zamrok zam...@cubrc.orgmailto:zam...@cubrc.org wrote: Based upon the schema, your code, and my experience I would expect you to get something like the following. purchase-order/ That said

RE: Problems getting started with xmlbeans

2010-11-22 Thread Duane Zamrok
. - Wing Yew From: Duane Zamrok [mailto:zam...@cubrc.org] Sent: Monday, November 22, 2010 11:44 AM To: user@xmlbeans.apache.org Subject: RE: Problems getting started with xmlbeans Based upon the schema, your code, and my experience I would expect you to get something

RE: parse fails on doc xmlbeans just saved

2010-08-30 Thread Duane Zamrok
You're attempting to parse junk.xml not new File(junk.xml). That is, you're attempting to parse the file name and not the file. -Duane -Original Message- From: Tim Watts [mailto:t...@cliftonfarm.org] Sent: Monday, August 30, 2010 7:31 AM To: user@xmlbeans.apache.org Subject: parse fails

RE: Removing an XML element

2010-08-17 Thread Duane Zamrok
Did the code execute without issue and just not work, or did it throw an exception of some sort? I've never really tried removing an element from my XMLObject hierarchy, but when I add elements I do the exact same kind of thing. Perhaps you could try something like the following. (fair warning

RE: XMLBeans does not correctly propagate namespaces

2010-07-08 Thread Duane Zamrok
One thing that I noticed when reading your schema example and messages is that you have not defined a top level element. That is to say there is no acceptable root element of a message/document that has been defined to be of type Model or FrotzModel. This is why you are getting (xml-fragment)

RE: XMLBeans does not correctly propagate namespaces

2010-07-08 Thread Duane Zamrok
None the less, if XMLBeans does not present a means by which to dictate the namespaces (which I'm almost positive it does through the Dom Nodes) then that is a shortcoming, if only small. From: Wing Yew Poon [mailto:wing.yew.p...@oracle.com] Sent: Thursday, July 08, 2010 5:51 PM To:

RE: Replacing a document element with a fragment

2010-06-01 Thread Duane Zamrok
I recently had a similar problem trying to parse fragment documents, and the response I got indicated that it is not possible. If the schema does not contain an element definition for the element you're trying to produce, then the document you're parsing and writing is

XMLBean Document Objects

2010-05-27 Thread Duane Zamrok
Hello, I'm working with an XML schema that defines a complex type but not an element of that type. This means that when I compile the schema with XMLBeans I get FooType.java but not a FooDocument.java. However, I'd like to be able to parse documents whose root element has been defined to be of

RE: XMLBean Document Objects

2010-05-27 Thread Duane Zamrok
may need to add a schemaLocation attribute to your xsd:import... element to get scomp to pull in the type definition automatically. Good luck, Peter. On Thu, 27 May 2010, Duane Zamrok wrote: Hello, I’m working with an XML schema that defines a complex type but not an element of that type