How to select the root element

2007-10-04 Thread Patrizio.Ferlito
Hi all, I need to select the root element from a xml document but without knowing its structure. XmlObject[] elems = document.selectPath("..."); I would like to know how to execute a statement like "document.getRootElement()." How can I do that ? Regards ferp IMPORTANT: This e-mail transmissi

Question about validating a XmlObject

2007-05-31 Thread Patrizio.Ferlito
Hi all, I would like to validate a xml document against a given xsd. My xml document doesn't contain any xsi:schemaLocation but the given xsd is well known. Below I reported a piece of code: File xmlFile = new File(xmlFilePath); XmlObject xml = XmlObject.Factory.parse(xmlFile);

RE: troubles executing XmlObject.selectPath

2007-04-19 Thread Patrizio.Ferlito
Hi Jacob, I was using eclipse but just now I switched to command line as your test, to see if there is any difference. So: 1) at source level the same changes as you try { //XmlObject _document = XmlObject.Factory.parse(docContent); XmlObject document = XPathRe

RE: troubles executing XmlObject.selectPath

2007-04-18 Thread Patrizio.Ferlito
Hi Jacob, thanks a lot for your support. Two 'strange' thinks that I've noticed: 1) your example (and now also my example) is working simply adding only one extra jar: saxon8-dom.jar. That is at the end the jars in my path are: saxon8.jar xbean_xpath.jar jsr173_1.0_api.jar xbean.jar saxon8-do

RE: troubles executing XmlObject.selectPath

2007-04-17 Thread Patrizio.Ferlito
Hi Jacob, I've added the suggested line: private final static String namespace= "http://www.bsource.ch/bs";; private final static String namespaceDeclaration = "declare namespace bs='" + namespace + "';"; public void setValue (String path, String value) throws Bookstor

RE: troubles executing XmlObject.selectPath

2007-04-16 Thread Patrizio.Ferlito
Ciao Radu, thanks for the suggestion but: private final static String namespace= "http://www.bsource.ch/bs";; private final static String namespaceDeclaration = "declare namespace bs='" + namespace + "';"; ... XmlObject[] elems = null; elems = document.selectPat

troubles executing XmlObject.selectPath

2007-04-13 Thread Patrizio.Ferlito
Hi all, I'm using xmlbeans-2.2.0 and saxonb8-6-1 and I'm trying to use the XmlObject.selectPath function. Here my xml document: http://www.bsource.ch/bs";> 1 author1 title1 2 author2 title2 generated using XmlCursor object in the following way: 1) in Bookstore

XMLBeans and SelectPath from XQueryXPath samples, does it work ?

2007-04-11 Thread Patrizio.Ferlito
Hi all, I'm using xmlbeans-2.2.0 and saxonb8-6-1 and I'm trying to run the provided SelectPath example from XQueryXPath samples (I'm interested mainly on XmlObject.selectPath usage). >From the XQueryXPath class I've commented out all calls to the ExecQuery class and I've left only the below cal

RE: XMLBeans and XmlCursor

2007-04-11 Thread Patrizio.Ferlito
Hi Cezar, the original document is the below: http://www.bsource.ch/EDA";> CS GROUP N 09-03-2007 1213853 -0.2 5821192 CHF // this line will be changed 87.9 87.75 87.7 size 471 bytes The xpath expres

RE: XMLBeans and XmlCursor

2007-04-10 Thread Patrizio.Ferlito
Hi Cezar, thanks. I've used: - XMLCursor.selectPath() - only one XMLCursor object - + cursor.push() & cursor.pop() methods. Now the result is ok: Response: http://www.bsource.ch/EDA";> CS GROUP N 09-03-2007 1213853 -0.2 5821192 001 87.9 87.75 002 87.7 but what about the

XMLBeans and XmlCursor

2007-04-06 Thread Patrizio.Ferlito
Hi all, I've just started to use XMLBeans and I had some troubles to use XmlCursor to navigate through a document, update it and get back the updated version. This is my xml document: http://www.bsource.ch/EDA";> CS GROUP N 09-03-2007 1213853 -0.2

RE: xmlbeans-2.2.0 and error running XQueryXPath sample

2007-03-02 Thread Patrizio.Ferlito
Hi Cezar, I've defined the classpath as follows: but I got: [java] java.lang.IllegalArgumentException: When a DOMSource is used, saxon8-dom.jar must be on the classpath So I've added also: ${LIB_

xmlbeans-2.2.0 and error running XQueryXPath sample

2007-03-01 Thread Patrizio.Ferlito
Hi all, I'm trying to run the XQueryXPath sample bundled with xmlbeans-2.2.0. I've compiled the sample and updated the xmlbeans-2.2.0\samples\XQueryXPath\build\lib folder with the below entries: 12.06.2006 11:4523'630 jsr173_1.0_api.jar 12.06.2006 11:4560'047 resolve