6
import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.Element;
    import java.io.File;

I woud like to work with the above. so,what is jar file I should download and from where??

Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58
user2019510
  • 1,460
  • 5
  • 16
  • 29
  • 2
    All part of the JDK. If you can run _Hello World_ you are set. Just use it as is. If you get an error message, include it in the post. – jlordo Aug 11 '13 at 15:55

2 Answers2

8

javax.xml, org.w3c and java.io packages resides in the classes.jar file in your JDK.

You shouldn't reference any external .jar file as this should be automatically referenced by your editor.

Mena
  • 47,782
  • 11
  • 87
  • 106
0

Although there is an implementation of the DOM provided with the JDK,

  1. the Xerces implementation available from Apache is better (fewer bugs)

  2. there are much better XML tree APIs available: DOM is the first and the worst, though sadly still the most popular. JDOM2 and XOM are faster and easier to use.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • thank you for very much for your recommendation could you please drop a useful links to start with jdom or xom? – user2019510 Aug 11 '13 at 19:03
  • 1
    Elliotte Rusty Harold's book on programming with Java and XML is well worth reading; after that, just use Google. – Michael Kay Aug 11 '13 at 21:37