Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java¶ÔXMLÎļþµÄ½âÎö¡¢½ÚµãµÄÔö¼Ó¡¢É¾³ý²Ù×÷×ܽá

ÏÈÌù´úÂë°É
¸Ðл£ºhttp://xranming.blog.163.com/blog/static/24204952009914104148872/
 http://www.diybl.com/course/3_program/java/javajs/20090303/157541.html
1¡¢java´úÂ룺
Ö÷Òª²ÉÓÃdomÀ´½øÐвÙ×÷
java¶Ôxml²Ù×÷ÓÐËÄÖÖ·½·¨£ºhttp://passmatlab.bokee.com/3455905.html
 package test;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
import org.xml.sax.SAXException;
public class XmlOprate {
 Document doc;
 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 DocumentBuilder builder;
 NodeList imags;
 String path;
 
 public NodeList getImags() {
  return imags;
 }
 public void setImags(NodeList imags) {
  this.imags = imags;
 }
 
 /**
  * ¹¹Ôì·½·¨
  * @param path:xmlÎļþµÄ·¾¶
  * @param nodes£ºÒª½âÎöµÄxml½ÚµãÃû³Æ
  */
 public XmlOprate(String path) {
  super();
  this.path = path;
  System.out.println(System.getProperty("user.dir"));
 }
 /**
  * ½âÎöXML
  * @param path
  */
 public  void readXml(){
  try {
   builder = factory.newDocumentBuilder();
   Document doc=builder.parse(path);
   doc.normalize();
   
   NodeList imags =doc.getElementsByTagName("imags");
   this.setImags(imags);
   for (int i=0;


Ïà¹ØÎĵµ£º

javaÖÐthis¹Ø¼ü×ÖÓ÷¨

 /**
* this¹Ø¼ü×ÖÓ÷¨
*/
public class Flower {

int petalCount = 0;
String s = "initial value";

Flower(int petals){
petalCount = petals;
System.out.println("Constructor with one int arg");
}

Flower(String ss){
System.out.println("Constr ......

Name java:comp is not bound in this Context

 
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
ÔÚtomcatÖз¢²¼webÏîÄ¿£¬¿ÉÄÜÊÇÒòΪspringÖÐÅäÖÃÁËjndi£¨Ö»ÅäÖÃÁËjndi£¬ÆäËûµÄÓй¤¾ß°ü·â×°ÁË£©¡£
Æô¶¯µÄʱºò±¨´í£¨ÔÚÏîĿĿ¼Ï£¬ÔÚtomcatÖÐÅäÖÃcontextÖ¸ÏòÏîĿĿ¼¾ÍûÎÊÌ⣬´ò°ü·¢²¼µ½
tomcat¾Í±¨´íÁË£©£¬Å×µÄÒì³£ÊÇ£º
jav ......

javaÖÐsynchronizedÓ÷¨

synchronizedµÄÒ»¸ö¼òµ¥Àý×Ó
public class TextThread
{
 /**
  * @param args
  */
 public static void main(String[] args)
 {
  // TODO ×Ô¶¯Éú³É·½·¨´æ¸ù
        TxtThread tt = new TxtThread();
      ......

java ѹËõÓë½âѹ

     ½üÀ´ÔÚ×öJAVAʱÓõ½ÎļþµÄѹËõÓë½âѹ,ÆäÖÐÅöµ½Á˸öÎÊÌâ:ÏÈÓÃJAVA´úÂë´ò°üºÃµÄJARÎļþ¾­¹ýC#µÄzlib´¦Àíºó,¾¹È»²»ÄÜÐÞ¸Ä!
     ÍøÉÏÕÒÁ˺ÃЩ´úÂ붼²»¿ÉÐÐ,JAVA´´½¨µÄJAR°üÔÚÐ޸ĵÄʱºò¿ÉÒÔ·¢ÏÖ¿ªÊ¼Óиö·¾¶·û'/'»ò'\',ËäÈ»ÔÚ´Ë¿ÉÒÔÐÞ¸ÄJARÎļþ,µ«ÊÇ×ܾõµÃÒþ»¼³öÔÚÕâ,ºóÀ´µÄÊÂÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ