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

JAVA²Ù×÷XMLµÄÍêÕûÀý×Ó——W3C DOMƪ

ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
 <book>
  <name>¹þÀﲨÌØ</name>
  <price>10</price>
  <memo>ÕâÊÇÒ»±¾ºÜºÃ¿´µÄÊé¡£</memo>
 </book>
 <book id="B02">
  <name>Èý¹úÑÝÒå</name>
  <price>10</price>
  <memo>ËÄ´óÃûÖøÖ®Ò»¡£</memo>
 </book>
 <book id="B03">
  <name>Ë®ä°</name>
  <price>6</price>
  <memo>ËÄ´óÃûÖøÖ®Ò»¡£</memo>
 </book>
 <book id="B04">
  <name>ºìÂ¥</name>
  <price>5</price>
  <memo>ËÄ´óÃûÖøÖ®Ò»¡£</memo>
 </book>
</books> 
ÏÂÃæÊÇΪTest.java
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.*;
import javax.xml.xpath.*;
public class Test ...{
    public static void main(String[] args) ...{
        DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
        Element theBook=null, theElem=null, root=null;
        try ...{
            factory.setIgnoringElementContentWhitespace(true);
           
            DocumentBuilder db=factory.newDocumentBuilder();
 


Ïà¹ØÎĵµ£º

¹ØÓÚJava IOÁ÷ѧϰ×ܽá

Ò»¡¢IOÁ÷µÄÈýÖÖ·ÖÀ෽ʽ
    1.°´Á÷µÄ·½Ïò·ÖΪ£ºÊäÈëÁ÷ºÍÊä³öÁ÷
    2.°´Á÷µÄÊý¾Ýµ¥Î»²»Í¬·ÖΪ£º×Ö½ÚÁ÷ºÍ×Ö·ûÁ÷
    3.°´Á÷µÄ¹¦Äܲ»Í¬·ÖΪ£º½ÚµãÁ÷ºÍ´¦ÀíÁ÷
    ¶þ¡¢IOÁ÷µÄËÄ´ó³éÏóÀࣺ
    ×Ö·ûÁ÷£ºReader Writer
    × ......

javaÉú³ÉJNIÍ·Îļþ

JavahÉú³ÉJNIÍ·Îļþ
¼ÙÉ蹤³ÌĿ¼ÏÂÓÐbinÎļþ¼Ð£¬bin´æ·Å±àÒëºÃµÄclassÎļþ;
ÔÚbinĿ¼Ï£¬
......\koalaTest\bin>javah -classpath . -jni com.jni.vikitest
È»ºóÔÚ.....\koalaTest\bin ¼´¿ÉÕÒµ½Ò»¸öcom_jni_Calculator.hÍ·Îļþ£¬Éú³É³É¹¦£¡ ......

»ùÓÚWindows CEµÄǶÈëʽJava½â¾ö·½°¸


[ÕªÒª]
±¾ÎĽéÉÜÁËһϵÁлùÓÚWindows CEµÄJavaÐéÄâ»úÒÔ¼°¼¯³É¿ª·¢»·¾³£¬ÆäÖаüÀ¨ IBM¹«Ë¾µÄVisual Age Micro Edition
£¨¾ÍÊÇÏÖÔÚµÄWebSphere Studio Device Developer£©,
Sun¹«Ë¾µÄPersonal Java, WabaSoft ·¢ÆðµÄWaba£¬Insignia¹«Ë¾µÄJeode (¾ÍÊÇÏÖÔÚEsmertecµÄJeode)£¬Nsicom¹«Ë¾µÄCrEmeÒÔ¼°New
Monics¹«Ë¾µÄPE ......

ÔÚjavaµ÷ÓÃexe£¬com¿ÉÖ´ÐÐÎļþºÍbat£¬cmdÅú´¦ÀíÎļþ

ÔÚjavaµ÷ÓÃexe£¬com¿ÉÖ´ÐÐÎļþºÍbat£¬cmdÅú´¦ÀíÎļþ
Ò»¡£ÔËÐÐexeÎļþ
    1. Java JDKÀïÒѾ­ÌṩÁ˵÷Óõķ½·¨£¬²»ÔÚÀÛ׸£¬´úÂëÈçÏ¡£
     try {
         String command = "notepad";
      & ......

½«java³ÌÐò±ä³Éexe¿ÉÖ´ÐÐÎļþ

½«java±àÖ¯³É.classºó£¬Èç¹ûÖ»ÊÇÓÃjavaÃüÁîÀ´Ö´ÐÐ×ܾõµÃ²»ÊÇÌ«¹ýñ«£¬ÕÒ¸ö°ì·¨Éú³ÉÏñexeÎļþÒ»ÑùÓÃÊó±êË«»÷±ã¿ÉÖ´ÐеÄÎļþ£¬Ó¦¸ÃÊǺÜÓÐȤµÄ°¡¡£ÕâÀïÎÒÓÃÁËÒ»¸öÃû×Ö½Ð×öexe4jµÄÃâ·ÑСÈí¼þ£¬¸Ð¾õ²»´í¡£
¡¡¡¡Ê×ÏÈ£¬µ±È»ÊÇÒªÏÂÔظöexe4j¡£ÎÒµÄÊÇ2.2°æ±¾µÄ£¬license£ºL-g782dn2d-1f1yqxx1rv1sqd¡£
¡¡¡¡½Ó×Å£¬½«ÄãҪѡÔñºÃÄã¼´½« ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ