You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
950 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # Ejercicio_11
  2. ### Introduccion
  3. Escribe en un fichero ".xml" utilizando DOM y lee el fichero de objetos **Persona.dat**
  4. ### Documentacion
  5. ##### LeerFichero
  6. ~~~
  7. import java.io.File;
  8. import java.io.FileInputStream;
  9. import java.io.IOException;
  10. import java.io.ObjectInputStream;
  11. import java.lang.reflect.Array;
  12. import java.util.ArrayList;
  13. ~~~
  14. ##### Personas
  15. ~~~
  16. import java.io.Serializable;
  17. import java.util.ArrayList;
  18. ~~~
  19. ##### Persona
  20. ~~~
  21. import java.io.Serializable;
  22. ~~~
  23. ##### ParserXml
  24. ~~~
  25. import java.io.File;
  26. import java.io.IOException;
  27. import java.util.ArrayList;
  28. ~~~
  29. ##### EscribirXml
  30. ~~~
  31. import java.io.File;
  32. import java.util.ArrayList;
  33. import javax.xml.parsers.*;
  34. import javax.xml.transform.*;
  35. import javax.xml.transform.dom.DOMSource;
  36. import javax.xml.transform.stream.StreamResult;
  37. import org.w3c.dom.Attr;
  38. import org.w3c.dom.Document;
  39. import org.w3c.dom.Element;
  40. ~~~
  41. ### Salida por pantalla
  42. ### Documentos generados
  43. personas.xml