当前位置: 技术问答>java相关
出现了错误:java.lang.NoClassDefFoundError: com/inprise/ejb/Container;和Exception in thread "main"
来源: 互联网 发布时间:2015-10-21
本文导语: 我编了一个javabean实现从xml文件中读内容: 源码如下: package xmlwriter; import javax.xml.parsers.*; import org.w3c.dom.*; public class xmldisplay { public static void main(String args[]){ try{ DocumentBuilderFactory factory = DocumentBu...
我编了一个javabean实现从xml文件中读内容:
源码如下:
package xmlwriter;
import javax.xml.parsers.*;
import org.w3c.dom.*;
public class xmldisplay {
public static void main(String args[]){
try{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder=factory.newDocumentBuilder();
Document doc=builder.parse("links.xml");
//doc.normalize();
NodeList links =doc.getElementsByTagName("link");
for (int i=0;i
源码如下:
package xmlwriter;
import javax.xml.parsers.*;
import org.w3c.dom.*;
public class xmldisplay {
public static void main(String args[]){
try{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder=factory.newDocumentBuilder();
Document doc=builder.parse("links.xml");
//doc.normalize();
NodeList links =doc.getElementsByTagName("link");
for (int i=0;i