Create XSD Components via XMLBEANS

2008-12-22 Thread michael
Hi, I couldn't find the way to create schema components via xmlbeans... e.g how i could make elements,types etc via xmlbeans? All the classes / interfaces have get is methods and none has set or add methods ,so i'am wondering if there is a way to create new XSD components via xmlbeans... Are

Re: Create XSD Components via XMLBEANS

2008-12-22 Thread Jacob Danner
I was just playing with a couple of xmlbeans' tools that did this over the weekend. Take a peek at the inst2xsd or sfactor tools and the source code behind them. Both tools create schemas. -jacobd On Mon, Dec 22, 2008 at 12:14 PM, michael michael@gmail.com wrote: Hi, I couldn't find the

Re: Create XSD Components via XMLBEANS

2008-12-22 Thread michael
First of all thank you for your quick answer, The first tool creates a schema from an instance document and for the second i have to search further to see the potentials. The problem is that i want to create components from scratch,with my willing and manage them.So,possibly the first i

Re: Create XSD Components via XMLBEANS

2008-12-22 Thread Jacob Danner
Hi Micheal, I was suggesting you look into the source of those tools as a reference point for what you are trying to do. In other words, the inst2xsd tool generates a schema from a xml instance. You are concerned with how to generate a schema using xmlbeans, so I would start by looking at how the

create an array using Factory.newInstance() method

2008-12-22 Thread Qureshi,Shahzad [Ontario]
Hi all, I am having problem creating an array using object.Factory.newInstance() method. This is what I am trying to do I've an xml element and xmlbean generated object is called Rule. I need to create an array of Rule to use it in xmlbean genereated method setRuleArray(Rule[] args) I can't use

Re: create an array using Factory.newInstance() method

2008-12-22 Thread Jacob Danner
Hi Shahzad, AFAIK you can't create a new array using the Factory.newInstance() method, but you can initialize items in the array with the method. Rule[] rule = new Rule[15]; for(int i = 0; i rule.length; i++){ rule[i] = Rule.Factory.newInstance(); } and then a call to rule[0].setId(SomeVal)