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

g¹ØÓÚDOM4JµÃµ½xmlÎĵµÖеĸú½ÚµãÏÂÀ´Ò»¸ö×Ó½Úµã....

Java code:
import org.dom4j.*;
import java.io.*;
import org.dom4j.io.*;

public class CreateXML {

public static void main(String[] args) {
//´´½¨¿ÕÎĵµ
Document document = DocumentHelper.createDocument();

//Ìí¼Ó¸ùÔªËØ
Element eleCakes = DocumentHelper.createElement("cakes");
document.setRootElement(eleCakes);

//Ìí¼Ó×ÓÔªËØ
Element eleCake1 = eleCakes.addElement("cake");
Element eleName1 = eleCake1.addElement("name");
Element elePrice1 = eleCake1.addElement("price");

//Ìí¼ÓÔªËØÄÚÈÝ
eleName1.addText( "ÇÉ¿ËÁ¦µ°¸â" );
elePrice1.addText("45.0");

//Ìí¼ÓÊôÐÔ
eleCake1.addAttribute("code", "B01");

//Ìí¼Ó×ÓÔªËØ
Element eleCake2 = eleCakes.addElement("cake");
Element eleName2 = eleCake2.addElement("name");
Element elePrice2 = eleCake2.addElement("price");

//Ìí¼ÓÔªËØÄÚÈÝ
eleName2.addText("±ùä¿Áܵ°¸â");
elePrice2.addText("50.0");

//Ìí¼ÓÊôÐÔ
eleCake2.addAttribute("code", "B02");

/*±£´æÎĵµ*/
OutputFormat format = OutputFormat.c


Ïà¹ØÎÊ´ð£º

FlashÖеÄXML¶ÔÏóµÄÊôÐÔÎÊÌâ

ÔÚ¿´Ò»¶ÎAS´úÂëʱÓöµ½¼¸¸öÒÉÎÊ¡£
ÔÚFlashÖеÄXML¶ÔÏóÃ²ËÆÓÐÒ»¸öchildÊôÐÔ
ÇëÎÊ
1.childÊôÐÔºÍchildNodesÓÐÊ²Ã´Çø±ð£¿
2.ASÖÐÓÐintÊý¾ÝÀàÐÍÂð£¿AS3.0ÖÐÓÐÂð£¿
´úÂëÖÐÓõ½ÁË´ËÀàÐÍ¡£
3._name¡¢_pare ......

C# DataSetµ¼³öxml Åú´¦Àí(Ñ­»·)µÃÔõô´¦Àí

DataSetµ¼³öxml Åú´¦Àí(Ñ­»·)µÃÔõô´¦Àí
XMLÎļþ
<A>
      <B>
        <C>
        </C>
  &nb ......

100·ÖÇóÖúJSµÄ½âÎöÒ»¶ÎXML,NETBOX·â×°³ö´í¡£¡£¡£¡£¡£

ÒÔÏ´úÂëÔÚIEÏÂÊÇ¿ÉÒÔÕý³££¬µ«ÊÇÓÃNETBOX·â×°¾Í²»ÐÐÁË£¬ÔËÐе½ºìÉ«µÄµØ·½¾Í³ö´íÁË£¬ËµÈ±ÉÙ¶ÔÏñ£¬ÇëÎÊÔõôÑùÐ޸ġ£


JScript code:

//////////////////// AJAXÀà////////////////
function getxml ......

ÕýÔò±í´ïʽ½âÎöxml£¿

RT
ÓÐûÓÐÔ´ÂëʵÀý£¡
лл£¡
²»ÊÇÓÐdom4jÕâÑùµÄ½âÎöxmlÎļþµÄ°üô ¸ÉÂï·ÇÒªÓÃÕýÔò£¿

Êܲ»ÁË£¡

Ã²ËÆ²»ÐаÉ



ÓУ¬ºÃ¼¸¸öÄØ£¬DOM,jdom£¬dom4j¡£¡£
¹þ¹þ£¡

ÓÉÓÚÎÒµÄxml±àÂë¸ñʽÓеãÎÊÌ⣬² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ