Problems with JDom

In my Jdom program I got the following errors during compilation. It could compile on one machine,
but it did not on another,even though I made sure the machines are set up properly:
package com.sun.java.util.collections does not exist
import com.sun.java.util.collections.*;
^
file com\sun\java\util\collections\List.class not found
outputter.output(jdomDocument, new FileOutputStream(outputfilename));
^
2 errors
Same thing with running it. I could run it on one machine, but not another:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/java/util/collections/Collection
at org.jdom.input.DefaultJDOMFactory.document(DefaultJDOMFactory.java)
at org.jdom.input.DOMBuilder.build(DOMBuilder.java)
at org.bcit.mmsd.lab5.MyJDOMParser.<init>(MyJDOMParser.java:86)
at org.bcit.mmsd.lab5.Controller.<init>(Controller.java:77)
at org.bcit.mmsd.lab5.Controller.main(Controller.java:135)

I've a similar problem. With this code:
import org.jdom.*; // version 8 beta
import org.jdom.input.*;
public static void listChildren(org.jdom.Element current) {
java.util.List children = current.getChildren();
Iterator iterator = children.iterator();
while (iterator.hasNext()) {
Element child = (Element) iterator.next();
listChildren(child);
compiled on NetBeans 3.4, I've got this error:
incompatible types:
found : com.sun.java.util.collections.Iterator
required: java.util.Iterator
Iterator iterator = children.iterator();
????????

Similar Messages

  • Intresting problem with JDOM and xmlns in root element.

    Hi all,
    I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element.Please tell me how to fix this issue.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Xml
    <process name="CreateKBEntryService" targetNamespace="http://serena.com/CreateKBEntryService" suppressJoinFailure="yes" xmlns:tns="http://serena.com/CreateKBEntryService" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:nsxml0="http://localhost:8080/axis/services/CreateKBEntryService" xmlns:nsxml1="http://DefaultNamespace" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    <partnerLinks>
              <partnerLink name="client" partnerLinkType="tns:CreateKBEntryService" myRole="CreateKBEntryServiceProvider"/>
              <partnerLink name="CreateKBEntryPartnerLink" partnerLinkType="nsxml0:CreateKBEntryLink" partnerRole="CreateKBEntryProvider"/>
         </partnerLinks>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
    Java:
    import java.io.*;
    import java.util.*;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.input.SAXBuilder;
    public class sample1 {
    public static void main(String[] args) throws Exception {
    // create a XML parser and read the XML file
    SAXBuilder oBuilder = new SAXBuilder();
    Document oDoc = oBuilder.build(new File("file location "));
         Element root = oDoc.getRootElement();
         System.out.println(root.getName());
         String tgtns= root.getAttributeValue("targetNamespace");
         System.out.println("tgt ns "+ tgtns);
    List list= root.getChildren("partnerLinks");
         Iterator it1= list.iterator();
         System.out.println(list.size());
         while(it1.hasNext()){
              Element partnerlinks = (Element)it1.next();
              List list2= partnerlinks.getChildren("partnerLink");
              System.out.println(list2.size());
              Iterator it2= list2.iterator();
              String[][] partnerLinkval = new String [2][list2.size()];
              int i=0,j=0;
              while(it2.hasNext())
                   Element el2= (Element)it2.next();
              String ElementName = el2.getName();
              partnerLinkval[i][j]= ElementName;
              j++;
              String Attribute = el2.getAttributeValue("myRole");
              partnerLinkval[i][j]= Attribute;
              i++;
              j--;
              System.out.println("Saving in array "+el2.getName());
              System.out.println("Saving in array "+Attribute);
              System.out.println("array length"+partnerLinkval.length);
              for (int l=0;l<2;l++){
              for(int k=0;k<partnerLinkval.length;k++)
                   System.out.println(partnerLinkval[l][k]);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Result:
    Without Xmlns in xml file
    process
    tgt ns http://serena.com/buildserviceflow
    1
    2
    Saving in array partnerLink
    Saving in array BpelServiceFlowProvider
    Saving in array partnerLink
    Saving in array null
    array length2
    partnerLink
    BpelServiceFlowProvider
    partnerLink
    null
    Result with xmlns:
    process
    tgt ns http://serena.com/CreateKBEntryService
    0

    Hi,
    I am also having the same problem using jdom, my code works fine when there is no xmlns attribute but when i put the xmlns attribute back in doesn't work.
    Did you manage to find a way to solve this problem?

  • Problems with JDOm XPath

    Hi all.
    I have a JDOM XML document and I use JDOMXPath to apply XPath expressions on the XML document.
    I have XPath expression for which JDOMXPath does not match any node:
    //*[not(count(descendant::a) < 4)]
    [not(descendant::node()[count(descendant::a)>3])]
    [not(descendant::text()[normalize-space(string())!='']
    [not(ancestor::a)])]
    XML parser such as Saxon, MSXML, etc. correctly match this XPath on the document and find the appropriate node-set, so the XPath expression is 100% right from the XPath syntax perspective.
    But in JDOM, it does not match.
    Could anybody tell me what is the problem?
    Thank you very much for help and sorry if this is the wrong place to ask this question - this is my first post here.
    Thanks again,
    Anna

    Sorry, forgot to tell something very important:
    the XML node-set that I am trying to match is as follows:
    <ul>
    <li>Accessibility</li>
    <li>Amaya</li>
    <li>ABC</li>
    <li>CC/PP</li>
    </ul>
    The interesting moment is, that if I change the node-set to look like this:
    <ul><li>Accessibility</li><li>Amaya</li><li>ABC</li><li><a href="Mobile/CCPP/"></a></li></ul>
    i.e. without any spaces, JDOMXPath will match for the above XPath.
    Is there any problem with spaces in JDOM/JDOMXPath?
    Thanks again
    Anna

  • Problem with JDOM and schemas

    I'm trying to parse (and validate) an XML document with JDOM.
    My root element is declared in the schaema whixh is asociated to the document.
    But during parsing, an exception saying that my root element is not declared is thrown.
    Can someone axplain to me what can happen ?
    Thank's

    What's this element ?
    My schema is indicated by the xsi:schemeLocation attribute of my root-element .

  • Problem with JDOM and euro character

    Hi,
    I have an xml file including euro characters (�) and starting with :
    <?xml version="1.0" encoding="ISO-8859-15"?>
    as it should probably be.
    However, my problem is that (JDOM and) SAXBuilder doesn't recognize the euro characters and replace them by an unknown character '?'.
    What's wrong and how can I solve it?
    Thanks in advance.

    All right, this is a a part of my code:
    ....SAXBuilder builder = new SAXBuilder( true );
    //create the document
    //this doc contains this tag <RefVersion> data�data </RefVersion>
    Document doc = builder.build( "E:\\test.xml" );
    System.out.print( "before charAt = " + "�".charAt(0) + String.valueOf('\u20ac') );
    String str = "euro�euro";
    System.out.println( "euro�euro ->" + str.replace('\u20ac','O') );
    Element root = doc.getRootElement();
    //recup du noeud RefVersion
    Element version = root.getChild( "RefVersion" );
    str = version.getText();
    System.out.println( "nom= " + version.getName() + " data= " + str );
    System.out.println( "index de � ds euro�euro " + str.replace('\u20ac','O') );
    and the output is:
    before charAt = ��
    euro�euro ->euroOeuro
    nom= RefVersion data= data?data
    index de � ds euro�euro data?data
    So, obviously, it comes from JDOM.

  • Formatting problem with JDOM

    friends,
    help me out plz..
    While creating a xml document using JDOM ,
    I am not able to get the formatted xml file.
    program output is:
    <?xml version="1.0" encoding="UTF-8"?>
    <person><name>A</name><name>B</name><name>C</name><name>D</name></person>
    I want the result as:
    <?xml version="1.0" encoding="UTF-8"?>
    <person>
         <name>A</name>
         <name>B</name>
         <name>C</name>
         <name>D</name>
    </person>
    // XMLGenerator.java
    import org.jdom.Element;
    import org.jdom.Document;
    import org.jdom.output.XMLOutputter;
    import java.io.*;
    public class XMLGenerator {
    public static void main(String[] args) throws Exception{
    Element root = new Element("employee");
    while(rs.next()) // rs .. ResultSet
    Element emp_name= new Element("name");
    emp_name.setText(rs.getString(rs.getString("name")));
    root.addContent(emp_name);
    Document doc = new Document(root);
    // serialize it into a file
    try {
    FileOutputStream out = new FileOutputStream("record.xml");
    XMLOutputter serializer = new XMLOutputter();
    serializer .setIndent(true);
    serializer.output(doc, out);
    out.flush();
    out.close();
    catch (IOException e) {
    System.err.println(e);

    try:
    XMLOutputter serializer = new XMLOutputter( " " );
    with the size of the indent you require.
    You dont really need the line: serializer.setIndent(true); if u use this constructor.
    Hope this Helps
    Sam

  • Deserialization Problem with JDOM Document

    HI,
    I am using weblogic7.0 and i have created my own class which implements serializable. I set the object of this class in the ObjectMessage and send it across. Sometime i have to send some vector,sometimes string and sometime a XML document. So i can set these type of objects in my custom serializable object and send it. For sending XML , either i can send it as a string or as u said as Document object. But i want to do send it as a Document object. So i have created a an object of "org.jdom.Document" which implement serializable and setting this object into my custom object and sending this custom object in the objectmessage. But then weblogic throws some exceptions which has to do with deserialization.I am printing the exception below. (without the object of org.jdom.Document this custom object reaches safely and happily:))........can you or anybody tell me what could be the reason..
    weblogic.jms.common.JMSException: Error deserializing object
    at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:140)
    at com.sds.kb.cm.CMMDBReceiver.onMessage(CMMDBReceiver.java:143)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:290)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:271)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2303)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2226)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    ----------- Linked Exception -----------
    weblogic.jms.common.JMSException: Error deserializing object
    at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:140)
    at com.sds.kb.cm.CMMDBReceiver.onMessage(CMMDBReceiver.java:143)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:290)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:271)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2303)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2226)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    any help would be apprciated..
    Akhil

    Are you sure that your object gets serialized in the first place? You could use the writeObject method (explained in Javadoc for java.io.Serializable) to snoop the process.
    I am actually surprised you can serialize a DOM document.
    /Sebastian

  • XSLT usage with JDOM problem

    When I try to do an XSL transformation on a JDOM tree
    using Oracle's xml classes from xmlparserv2.jar (includes
    the javax.xml.transform api) I get the following:
    java.lang.ClassCastException: org.jdom.transform.JDOMSource$DocumentReader
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:201)
    The same code works with xalan/crimson as well as saxon/aelfred, anyone
    seen this and knows a solution? Code snippet:
    private Frame transform(Document in, URL stylesheet) {
         TransformerFactory f = TransformerFactory.newInstance();
         InputStream s = stylesheet.openStream();
         Transformer transformer = f.newTransformer(new StreamSource(s));
         JDOMResult out = new JDOMResult();
         out.setFactory(new FPLNodeFactory());
         transformer.transform(new JDOMSource(in), out);
         s.close();
         return (Frame)out.getDocument().getRootElement().detach();
    I was wondering if there is a problem with the Oracle's impelmentation or am I using it incorrectly.
    Thanks.
    Suhas.

    This forum is mostly reviewed by folks using the XML features in the database (which basically means version 9.2). This is an XDK question--I would post it to Technologies > XML > General.

  • Problem with using JDom to parse Schema , help

    hi there
    I try to use samples downloaded from following URL to parse a schema stored on my hard drive
    http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-validation3_p.html
    the parseschema() method used in this sample uses SAX to read in the supplied schema URL and build a JDOM Document object. but I change it to read a string of "C:\\EBT Express\\shoes.xsd" and build a JDOM Document Object. but I got IOException saying that the file is not found. anyone out there familiar with JDOM, please help. can I use a string to replace URL?
    thank you.

    hi there
    thank you for your reply. I am just curious about how you run that sample code. when you supply a data to validate, how do you do it?

  • XML validation with JDOM / JAXP

    Hello,
    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    I did a first attempt but not sure I have understood all what I am doing :(
    First I have create a parser usinf org.jdom.*
    SAXBuilder parser = new SAXBuilderThen I built my document:
    Document doc = parser.build(myFile)These 2 steps are ok. But it does not do validation.
    I saw in the JDOM documentation that I can set a validation flag to true. I did it. First problem, I got the following error from JDOMException: Document is invalid: no grammar found.
    Is there a way to specify to the parser where to find the xsd file?
    As I did not find answer to this question by myself, I tried implementing the Schema class from JAXP:
    SAXBuilder parser = new SAXBuilder;
    Document doc = parser.build(myFile);
    Schema schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaFile);
    ValidatorHandler vh = schema.newValidatorHandler();
    SAXOutputter so = new SAXOutputter(vh);
    so.output(doc);It does the validation against the schema file specified but I am not really sure about what I am doing here. The last 2 commands are not clear to me :(
    Then in my schema file, I have elements that have default value. I expected the following behavior: if the element is not in the xml file then the default will be used by the parser (and added in the tree). But it seems, it's not the case.
    Any help/explanation will be really appreciated.

    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    If only schema validation is required use the validation API in JDK 5.0.
    http://www-128.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html
    http://java.sun.com/developer/technicalArticles/xml/validationxpath/
    For validation with JDOM, the following validation application explains the procedure:import org.jdom.input.SAXBuilder;
    import org.xml.sax.SAXException;import org.jdom.*;
    import java.io.*;
    public class JDOMValidator{
    public void validateSchema(String SchemaUrl, String XmlDocumentUrl){
               try{
    SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser",true);<br/>saxBuilder.setValidation(true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema",true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
    saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",SchemaUrl);
    Validator handler=new Validator();
    saxBuilder.setErrorHandler(handler);
    saxBuilder.build(XmlDocumentUrl);
    if(handler.validationError==true)
    System.out.println("XML Document has Error:"+handler.validationError+""+
    handler.saxParseException.getMessage());      
    else           
          System.out.println("XML Document is valid");
              }catch(JDOMException jde){
                }catch(IOException ioe){
    private class Validator extends DefaultHandler{     
         public boolean  validationError = false; 
         public SAXParseException saxParseException=null;    
      public void error(SAXParseException exception) throws SAXException{        
         validationError =true;
         saxParseException=exception; 
      public void fatalError(SAXParseException exception) throws SAXException  {
    validationError = true;     
    saxParseException=exception;
      public void warning(SAXParseException exception) throws SAXException       {
    public static void main(String[] argv)   {
       String SchemaUrl=argv[0];StringXmlDocumentUrl=argv[1];
       JDOMValidator validator=new JDOMValidator();
       validator.validateSchema(SchemaUrl,XmlDocumentUrl);
    }

  • Modifying XML files with JDOM

    Hi:
    I've been trying to get up to speed with JDOM, and while it seems pretty intuitive, I've been having a problem w/ modifying XML documents.
    Namely, once I get a Document object from a (skeleton) XML file, do changes made to the Document object through, say, addContent() propagate to the original file? My gut feeling is no, although this was certainly what I had expected initially.
    Here's a code fragment of what I had tried to do to populate a barebones XML file:
                   Document doc = builder.build(output);
              // add 100 elements, all the same
              for (int count = 0; count < 100; count++)
                   Element curr = new Element("book");
                   // create child nodes for book
                   Element title = new Element("title");
                   title.addContent("Book " + (count + 1));
                   Element author = new Element("author");
                   author.addContent("Author " + (count + 1));
                   Element price = new Element("price");
                   price.addContent("Price " + (count + 1));
                   curr.addContent(title);
                   curr.addContent(author);
                   curr.addContent(price);
                   doc.getRootElement().addContent( curr );
              }

    Mikael,
    This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.
    There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.
    There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.
    Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.
    Russ

  • Execution problem with java.exe

    Hi everybody. I am a student in a belgian university, and i've got a problem with the execution of my binaries in the JVM.
    I'm developping my project with Eclipse. When I build the project, Eclipse launch perfectly my application with javaw.exe (I supposed it because it's written in the console when I run the project).
    Thus, I wanted to try to launch my application by myself, to check if everything is right...
    My project is composed like this :
    - creavea/src : the sources of my project (a package called "main" , and a package "com.creavea. ..." and other .jar files like a MySQLConnector/J, edtFTPj, the JOutlookBar by lf2prod, ...
    - creavea/bin : Eclipse puts the binaries there, when I run my project.
    - creavea/files : Somes files like configuration files for my application, etc ...
    - creavea/images : Images for my interface.
    - the main class, containing the pubilc static void main method, is called CreaGesta, and is in the "main" package.
    creavea is the name of my project, but i think you supposed it !
    I want to run the binaries, then i do this :
    - I open a ms-dos console
    - I'm going in the C:\eclipse\workspace\creavea\bin folder
    - I execute the command : java main.CreaGesta ...
    And it doesn't work :'( ! An error appears :
    Exception in thread "main" java.lang.NoClassDefFoundError : com/lf2prod/common/swing/JOutlookBar.
    This class, JOutlookBar is used by my application, and the jar file containing the class is in my /bin folder. I can't understand, i'm a little bit disapointed.
    It's my first big project in Java, then i don't really understand what's happening. So if someone can help me, it will be really nice for me ! Thanks a lot for your help !
    J�r�me - Belgium

    Thank you for your reply Atmguy ! I put in my command the classpath of the jar's who are in my /bin folder.
    Like this : java -classpath edtftpj-1.4.9.jar; jdom.jar;l2fprod-common-outlookbar.jar;mysql-connector-java-3.1.8-bin.jar main.CreaGesta But now, i've got an other error message :
    Exception in thread "main" java.lang.NoClassDefFoundError : main/CreaGestaOh, it changed ! but I don't understand the problem . What does it mean? "Java cannot find the class main/CreaGesta", or "An error occured in main.CreaGesta" ?
    Can somebody help me to solve this new error ? Thank you !

  • Txt to xml. Problems with characters(&, , ',...)

    I want to generate a xml file with text from a txt file but i have problems with special characters such as &, <... I'd like to know if there�s any class or library to filter the text in order to generate my xml without problems.
    Thank you.

    Use JDOM to generate your XML. It will worry about escaping issues for you.
    Here's a (probably rather inelegant) example for you to play around with:
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    public class DateBoom {
         public static void main(String[] args)
              throws Exception
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
              String dodgyText = "< & '";
              Document document = builder.newDocument();
              Element root = document.createElement("root");
              root.setAttribute("dodgy",dodgyText);
              document.appendChild(root);
              Element child = document.createElement("child");
              root.appendChild(child);
              child.appendChild(document.createTextNode(dodgyText));
              Transformer transform = TransformerFactory.newInstance().newTransformer();          
              Source source = new DOMSource(document);
              Result result = new StreamResult(System.out);
              transform.transform(source,result);
    }Your alternative is to use something like String regular expressions (regex) to do this manually, but the XML oriented libraries will catch more corner cases than you're likely to anticipate, making them more reliable.

  • [XML/XPATH] jaxen : problem with "parent" function

    Hello
    I have a problem with jaxen, when I try to use the XPath function parent :
    When I try this :
    import ...
    DocumentNavigator dn=new DocumentNavigator();
    try {
    objet=dn.getDocument("TESTXPath.xml");
    apath=dn.parseXPath("/Entry/Resultats/step/Population/individu/*");
    result=apath.evaluate(objet);
    System.out.println(result);
    apath=dn.parseXPath("/Entry/Resultats/step/Population/parent::*");
    result=apath.evaluate(objet); // ---> exception
    System.out.println(result);
    catch(Exception e) {
    e.printStackTrace();
    The first result is well displayed, but just before the second, I catch this exception:
    Exception in thread "main" java.lang.NoSuchMethodError: org.jdom.Element.getParent()Lorg/jdom/Element; at org.jaxen.jdom.DocumentNavigator.getParentAxisIterator(DocumentNavigator.java: 252)
    at org.jaxen.expr.iter.IterableParentAxis.iterator(IterableParentAxis.java:82)
    at org.jaxen.expr.DefaultStep.axisIterator(DefaultStep.java:139)
    at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:188)
    at org.jaxen.expr.DefaultAbsoluteLocationPath.evaluate(DefaultAbsoluteLocationPat h.java:126)
    at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107)
    at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:716)
    at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:239)
    at org.jaxen.BaseXPath.evaluate(BaseXPath.java:196)
    at MainTestClass.main(MainTestClass.java:85)
    However, the first query works good and I received list so I'm quite sure that it's not a problem of unfindable elements.
    Finaly I can't be syccessful to use XPath parent function:
    Either I catch an exception, or it returns nothing or empty list
    Isn't the XPath syntax correct in my second expression ?
    Can we do :
    /.../.../parent::* ? ou //individu/parent::* ?

    Thanks
    I think so, but.
    In fact I don't think I'm using different version of JDOM.
    I use eclipse with jdk1.4.2.
    I have downloaded JDOM-b10 and the only things I have done is to extract zip archive and to add all .jar files of the jdom directory in my library path.
    Do this is the only version of JDOM I'm using.
    All works perfectly excepted only the XPath parent method. It's strange that the other methods work fine.
    I don't knnow how to solve this problem ! so if you can help me I be very thankfull.

  • Urgent :::::.i WISH TO DO THIS WITH JDOM and JAVA .

    file A.XML
    <XML>
    <TP>
    <FF>
    </FF>
    </TP>
    </XML>
    file B.XML
    <XML>
    <TP>
    <GG>
    </GG>
    </TP>
    </XML>
    I WANT TO PASTE node GG in b.xml to a.xml like this
    <XML>
    <TP>
    <FF>
    <GG>
    </GG>
    </FF>
    </TP>
    </XML>
    i WISH TO DO THIS WITH JDOM and JAVA .
    Please let me know how to do this ....
    i dont want to use XSL OR XSLT ...
    i am free for discussions...pls help me
    ciao

    You can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • IMac G3 Won't boot up?

    I have a IMac G3 slot loading and it wont boot up every time?   Some times I trun it on it go to the apple and boots up.   But most of the time its just a gray screen and then a fast white screen than back to gray with a folder?   When it does come o

  • Won't allow me to register?

    I just recently bought an 8g Nano today and i go to plug it in and i download itunes. then i go to the ipod on itunes and there is no way for me to register any suggestions?

  • Mac Safari fights with Parallels Desktop

    When I have Safari running, and then launch Windows via Parallels Desktop, everything slows to a crawl. If I quit either Safari or Parallels Desktop, everything goes back to full speed. It seems like some kind of degeneration. I had this problem a wh

  • Why does this logo have jagged edges?

    I'm working on a new logo and before I get too far along I need to resolve this issue;  why does this shape have jagged edges when posted on the web?   you can see it on-line auctionontario.ca Thx

  • Is iOS 7.0.4 worth installing on iPad Mini WiFi (1st Gen)?

    I've heard mixed responses with some people saying it works great and others saying that their batteries were nuked following the update. Has any of the issues been fixed from the initial version? Is it worth taking the plunge or should I wait? I mai