problemas con Jdom
Publicado por miguel (2 intervenciones) el 01/10/2005 02:47:29
Espero que me podais ayudar, tengo el Jdom.jar en una carpeta Libraries de mi proyecto, sin embargo me sale error de que no puede usar este metodo de la clase elemento, en este caso addAtrtribute... que se encuentra en org.jdom.Element,
si no uso el metodo ya no sale error porque? es por la forma del import org.jdom?
import java.io.*;
import java.util.*;
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;
public class Main {
public static void main(String[] args) {
// Create the root element
Element carElement = new Element("car");
//create the document
Document myDocument = new Document(carElement);
//add an attribute to the root element
carElement.addAttribute(new Attribute("vin", "123fhg5869705iop90")); //aqui me sale error!!!!!
si no uso el metodo ya no sale error porque? es por la forma del import org.jdom?
import java.io.*;
import java.util.*;
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;
public class Main {
public static void main(String[] args) {
// Create the root element
Element carElement = new Element("car");
//create the document
Document myDocument = new Document(carElement);
//add an attribute to the root element
carElement.addAttribute(new Attribute("vin", "123fhg5869705iop90")); //aqui me sale error!!!!!
Valora esta pregunta


0