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

dom4j¶Ôxml±È½ÏÍêÕûµÄ²Ù×÷

×î½üдµÄ²å¼þÓõ½ÁËdom4j£¬À´¶Áд£¬ÐÞ¸ÄÎĵµ¡£Óõ½µÄ¹¦Äܶ¼Ð´³öÀ´ÁË
ÏÂÃæ°üº¬ÁËÁ½¸ö³ÌÐò WriteFriendsInfo£¬ºÍ ReadFriendsInfo¡£
1.WriteFriendsInfo °üº¬ÁËн¨xmlºÍÐ޸ģ¬É¾³ýxml½ÚµãµÄ·½·¨
 Ò»Ð©Òªµã£º
    WriteFriendsInfo ÖÐÐ޸Ľڵã²ÉÓõķ½Ê½ÊÇɾ³ý½Úµã£¬È»ºó°ÑеĽڵãд½øÈ¥¡£ÔÚ²»¶Ô¶ÁдҪÇóºÜ´óµÄÇé¿öÏ£¬ÕâÑù×ö±È½Ï¼òµ¥¡£
   »¹ÓоÍÊÇÖÐÎĵĶÁдÎÊÌ⣺
   Ð´Èë´øÖÐÎÄµÄ Document µ½xmlÎı¾
            OutputFormat format = OutputFormat.createPrettyPrint();           
            format.setEncoding("UTF-8");           
            output = new XMLWriter(new FileWriter(new File("/kb2.xml")),format);
  ¶Á´øÖÐÎĵÄxmlÎı¾£º
        ÎÒÔ­À´ÊÇÕâôдµÄ£ºdocument = saxReader.read(new File("/kb2.xml"));
½á¹ûÒ»Óöµ½ÖÐÎľͱ¨´í£¬ÓÃFileReader¿ÉÒÔÃâÈ¥ºÜ¶à×Ö·ûÎÊÌ⣺
             FileReader fr= new FileReader(new File("/kb2.xml"));
            document = saxReader.read(fr);
2.ReadFriendsInfo µÄ×÷ÓÃÊǶÁxmlÊý¾Ý·ÅÈë×Ô¶¨ÒåµÄÊý¾Ý½á¹¹¡£
             ¶Á½ÚµãºÜ¼òµ¥³ä·ÖÌåÏÖÁË dom4jµÄÖÇÄÜ»¯
    
  package com.soulnew.netbeansmessage;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.XMLWriter;
import java.io.*;
import java.util.Iterator;
import java.util.List;
import org.dom4j.io.OutputFormat;
public class WriteFriendsInfo{
   
    String filename="/kb2.xml";
   
    public void setFilename(String filename) {
&nbs


Ïà¹ØÎĵµ£º

JAVA¶ÔÏóת»»ÎªXML¸ñʽ

JAVA¶ÔÏóת»»ÎªXML¸ñʽ
    ¼òµ¥µÄ²üÊöÏÂÈçºÎ½«JAVA¶ÔÏóת»»ÎªXML¸ñʽ£¬ÏêϸÁ˽âÇë½øÈëhttp://xstream.codehaus.org/tutorial.html
  
 JAVABEAN¶ÔÏó
 
  userInfo.java
         private String name;
   & ......

°ÑdatatableÀïµÄÊý¾Ýת»»³Éxml¸ñʽµÄ×Ö·û´®

string GetXmlByDataTable()
    {
        string xmlstr;
        string sql = "select top 10 * from BasicInfo";
        DataTable dt = idb.ReturnDataTable(sql);
  &nb ......

C#¶ÔXML¶Áд

תÔØ×Ô£ºhttp://virgos.javaeye.com/blog/611146
Ò»£®Ç°ÑÔ£º
XMLÊÇ΢Èí.NetÕ½ÂÔµÄÒ»¸öÖØÒª×é³É²¿·Ö£¬¶øÇÒËü¿ÉνÊÇXML Web·þÎñµÄ»ùʯ£¬ËùÒÔÕÆÎÕ.Net¿ò¼ÜϵÄXML¼¼Êõ×ÔÈ»ÏԵ÷dz£ÖØÒªÁË¡£±¾ÎĽ«Ö¸µ¼´ó¼ÒÈçºÎÔËÓÃC#ÓïÑÔÍê³É.Net¿ò¼ÜϵÄXMLÎĵµµÄ¶Áд²Ù×÷¡£Ê×ÏÈ£¬ÎÒ»áÏò´ó¼Ò½éÉÜ.Net¿ò¼ÜÖÐÓëXMLÏà¹ØµÄÃüÃû¿Õ¼äºÍÆäÖеÄÖØÒªÀ ......

[Flex]xmlÓëFlexͨÐŵÄÑо¿

Ñо¿E4XÓëFlexµÄ¹Øϵ£¬ËùÒÔ´òËã×ܽáһϣ¬ÓÐ˵µÄ²»¶ÔµÄµØ·½£¬»¹Çë´ó¼Ò¶à¶àÔ­Á¡£
Ò»¡¢×î¼òµ¥Ä£Ê½£ºFlexͨ¹ýhttpserviceºÍdataProvider½øÐÐÊý¾Ý´«Êä
Xml¸ñʽÈçÏ£º
<?xml version="1.0" encoding="utf-8" ?>
<Result>
<NodeA>value1</NodeA>
<NodeB>valve2</NodeB>
…&he ......

flexÖÐxmlת»¯ÎªarrayʵÀý

±¾ÎĹ²Á½¸öÎļþ£ºtranslate.mxml ºÍ mapmarking.xml
1¡¢translate.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="librar ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ