Re: Questions from a newbie!

2008-12-18 Thread michael
First of all thank you for your guick answer!

I saw many of these before asking but i think that for the job i want to
be done many of this are irrelevant because almost all tutorials and
guides are mostly for instance manipulation.

Is there any link/guide/tutorial for primitive jobs with xmlbeans?e.g
parsing/compiling/loading of  XSD's  

I wrote this piece of code and i can't figure out why it doesn't work.


import org.apache.xmlbeans.*;
import java.io.*;
import javax.xml.namespace.*;


public class XMLBeansClass {


public static void main(String[] args) {
   
XmlObject xob = XmlObject.Factory.parse(new
File(/home/X/Y/Z/W/Eclipse_WorkPlace/ProjectXMLBeansTesting/src/T.xsd));
XmlObject xmlobj[] = {xob};
SchemaTypeSystem t =
XmlBeans.compileXsd(xmlobj,XmlBeans.getBuiltinTypeSystem(),null);
  
}

}


I get from eclipse compiler this error message :

3 errors :

Unhandled exception  type  IOException  line 18   Java Problem

Unhandled exception  type  XmlException   line 20   Java Problem

Unhandled exception  type  XmlException   line 20   Java Problem


Can anyone indicate where the problem is?I can't figure out what to do

Thanks in advance,

Michael

-
Israel Rivera Jr wrote:
 Hey Michael,

 Do not worry we all had to start some where.  Anyhow, when I first
 began using xmlbeans I read thought almost all of the tutorials.  Sure
 it did take me a while to get up and running, however, once I was
 everything was working great and I understood why.

 Check these out and see what you come up with:

 http://xmlbeans.apache.org/docs/2.0.0/guide/conGettingStartedwithXMLBeans.html

 http://xmlbeans.apache.org/documentation/tutorial_getstarted.html

 http://xmlbeans.apache.org/documentation/index.html#XMLBeans+Version+1+User+Documentation

 Regards,

 Israel Rivera

 On Thu, Dec 18, 2008 at 11:56 AM, michael michael@gmail.com
 mailto:michael@gmail.com wrote:

 Hi everybody!

 First of all sorry for my procceded bad English.

 I'am really a dummy,so i am asking for help.

 My BA Thesis is about XSD type matching, so i need help.

 I've figured out that the API that more likely i need to use for my
 assignment is Schema Type API.(I hope i'am right!)

 So,for start , i am trying to insert (don't know the
 terminology,sorry)
 , possibly that would be compile/parse the XSD file into my code in
 order to use it and figure out what every interface/field/method
 does ,
 simply newbie printing things for now.

 I tried to use on my code the CompileXsd() but i can't figure out and
 understand thoroughly how this method works,what it takes etc etc.

 To give you a more deep scope to what i want, i want to pass into my
 code the .xsd file which is specified somewhere in my disk  and start
 playing  with  it , with the built-in interfaces.

 For the record,i'm using Eclipse ganymede and i've already insert the
 xmlbeans-2.4.0 jars etc into my personal libraries on the project
 , and
 all imports are ok.

 I would like to give me samples of code for passing in the .xsd file
 because i can't figure out what the methods take as parameters.


 Thanks in advance,

 Michael

 PS. I'm new to JAVA to... :(

 -
 To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
 mailto:user-unsubscr...@xmlbeans.apache.org
 For additional commands, e-mail: user-h...@xmlbeans.apache.org
 mailto:user-h...@xmlbeans.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Questions from a newbie!

2008-12-18 Thread Jacob Danner
Hi Michael,
There are some examples of this kind of thing in the test case
directory. Take a peek in the SVN depot or view at:
http://svn.apache.org/viewvc/xmlbeans/trunk/test/src/compile/scomp/som/

As far as the Eclipse errors you are seeing, those are just your
standard Java errors. It might be worthwhile going through a java
tutorial to save yourself some headaches. The lines you are on getting
these errors from are lines 18 and 20. You can enable line numbers in
eclipse in the preferences panel.
-jacobd

On Thu, Dec 18, 2008 at 11:49 AM, michael michael@gmail.com wrote:
 First of all thank you for your guick answer!

 I saw many of these before asking but i think that for the job i want to
 be done many of this are irrelevant because almost all tutorials and
 guides are mostly for instance manipulation.

 Is there any link/guide/tutorial for primitive jobs with xmlbeans?e.g
 parsing/compiling/loading of  XSD's

 I wrote this piece of code and i can't figure out why it doesn't work.


 import org.apache.xmlbeans.*;
 import java.io.*;
 import javax.xml.namespace.*;


 public class XMLBeansClass {


public static void main(String[] args) {

XmlObject xob = XmlObject.Factory.parse(new
 File(/home/X/Y/Z/W/Eclipse_WorkPlace/ProjectXMLBeansTesting/src/T.xsd));
XmlObject xmlobj[] = {xob};
SchemaTypeSystem t =
 XmlBeans.compileXsd(xmlobj,XmlBeans.getBuiltinTypeSystem(),null);

}

 }

 
 I get from eclipse compiler this error message :

 3 errors :

 Unhandled exception  type  IOException  line 18   Java Problem

 Unhandled exception  type  XmlException   line 20   Java Problem

 Unhandled exception  type  XmlException   line 20   Java Problem

 
 Can anyone indicate where the problem is?I can't figure out what to do

 Thanks in advance,

 Michael

 -
 Israel Rivera Jr wrote:
 Hey Michael,

 Do not worry we all had to start some where.  Anyhow, when I first
 began using xmlbeans I read thought almost all of the tutorials.  Sure
 it did take me a while to get up and running, however, once I was
 everything was working great and I understood why.

 Check these out and see what you come up with:

 http://xmlbeans.apache.org/docs/2.0.0/guide/conGettingStartedwithXMLBeans.html

 http://xmlbeans.apache.org/documentation/tutorial_getstarted.html

 http://xmlbeans.apache.org/documentation/index.html#XMLBeans+Version+1+User+Documentation

 Regards,

 Israel Rivera

 On Thu, Dec 18, 2008 at 11:56 AM, michael michael@gmail.com
 mailto:michael@gmail.com wrote:

 Hi everybody!

 First of all sorry for my procceded bad English.

 I'am really a dummy,so i am asking for help.

 My BA Thesis is about XSD type matching, so i need help.

 I've figured out that the API that more likely i need to use for my
 assignment is Schema Type API.(I hope i'am right!)

 So,for start , i am trying to insert (don't know the
 terminology,sorry)
 , possibly that would be compile/parse the XSD file into my code in
 order to use it and figure out what every interface/field/method
 does ,
 simply newbie printing things for now.

 I tried to use on my code the CompileXsd() but i can't figure out and
 understand thoroughly how this method works,what it takes etc etc.

 To give you a more deep scope to what i want, i want to pass into my
 code the .xsd file which is specified somewhere in my disk  and start
 playing  with  it , with the built-in interfaces.

 For the record,i'm using Eclipse ganymede and i've already insert the
 xmlbeans-2.4.0 jars etc into my personal libraries on the project
 , and
 all imports are ok.

 I would like to give me samples of code for passing in the .xsd file
 because i can't figure out what the methods take as parameters.


 Thanks in advance,

 Michael

 PS. I'm new to JAVA to... :(

 -
 To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
 mailto:user-unsubscr...@xmlbeans.apache.org
 For additional commands, e-mail: user-h...@xmlbeans.apache.org
 mailto:user-h...@xmlbeans.apache.org




 -
 To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
 For additional commands, e-mail: user-h...@xmlbeans.apache.org



-
To unsubscribe, e-mail: