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

dom4j¶ÁÈ¡xmlÎļþÀý×Ó

package com.test.dom4j;
import java.io.*;
import java.util.*;
import org.dom4j.*;
import org.dom4j.io.*;
public class MyXMLReader {
public static void main(String arge[]) {
try {
File f = new File("src/testxml.xml");
SAXReader reader = new SAXReader();
Document doc = reader.read(f);
Element root = doc.getRootElement();
Element foo;
for (Iterator i = root.elementIterator("VALUE"); i.hasNext();) {
foo = (Element) i.next();

System.out.print("³µÅƺÅÂë:" + foo.elementText("NO"));
System.out.println("³µÖ÷µØÖ·:" + foo.elementText("ADDR"));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
<?xml version="1.0" encoding="utf-8" ?>
<Result>
<VALUE>
<NO DATE="2005">A1</NO>
<ADDR>GZ</ADDR>
</VALUE>
<VALUE>
<NO DATE="2004">A2</NO>
<ADDR>XG</ADDR>
</VALUE>
</Result>


Ïà¹ØÎĵµ£º

½áºÏʹÓÃ½Ó¿ÚºÍ ODI Ô¼Êø¿ª·¢ ODI XML µ½Êý¾Ý¿âµÄת»»

Ö÷Ìâ
±¾ OBE ½Ì³Ì°üÀ¨ÏÂÁÐÖ÷Ì⣺
¸ÅÊö
Çé¾°
Ñé֤ǰÌáÌõ¼þ
ÔÚ ODI ÖÐн¨ÏîÄ¿
Ϊ XML Îļþ²åÈëÐÂÄ£ÐÍ
ΪÊý¾Ý¿â±í CLIENT ²åÈëÄ£ÐÍ
ɾ³ý CITY_CLIENT µÄÔ¼Êø¸±±¾
ÔÚ CLIENT Êý¾Ý´æ´¢ÉÏÉèÖà ODI Ô¼Êø
µ¼Èë֪ʶģ¿é
´´½¨ÓÃÓÚ¼ÓÔØ XML ÎļþµÄнӿÚ
Ö´ÐгÌÐò°ü²¢²âÊÔ½á¹û
²é¿´½Ó¿ÚÖ´ÐеÄÔ¼Êø´íÎó
×ܽá
Ïà¹ØÐÅÏ¢
......

Ò»¸öXML¶ÁдÀà

ÄܶÁдÈκÎXMLÅäÖÃÎļþ£¬ÄÜʵÏÖÓû§²ãÃæµÄ¼Ó½âÃÜ£¬ÒÔÏ´úÂëÖеÄB64Eº¯ÊýΪ¼ÓÃܺ¯Êý£¬B64DΪ½âÃܺ¯Êý£¬¿ÉÒÔ×Ô¼º±àд
Éú³ÉµÄXML¸ù½ÚµãΪZBS£¬¿ÉÒÔÌ滻ΪÆäËüÓÐÒâÒåµÄ½ÚµãÃû³Æ
Option Explicit
Public xmlDoc As DOMDocument
Public aNode As IXMLDOMElement 'µ±Ç°¼¤»îNode
Public xmlFilePath As String, ReadOnly As Bo ......

flexÖÐʹÓÃhttpservice¶ÁÈ¡xmlÎļþ

1¡¢mian.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="HTTPSrv.send();" width="242" height="442">
<mx:Script>
<!--[CDATA[

import mx.rpc.events.ResultEv ......

Symbian——½âÎöXMLÎļþ

ZT:http://www.mobpub.net/archiver/?tid-28.html
Symbianѧϰ±Ê¼Ç(15)——½âÎöXMLÎļþ(ÉÏ)
½ñÌìÏë·ÖÏíµÄÊÇÈçºÎÔÚSymbianƽ̨ÉϽâÎöXMLÎļþ£¬²»ÐèÒªµÚÈý·½µÄ¶«Î÷£¬SymbianÒѾ­ÎªÎÒÃÇÌṩÁËÕâ¸öÀàCParser¡£
ÍøÉÏÒ²ÓÐÕâ·½ÃæµÄ×ÊÁÏ£¬½¨Òé²Î¿¼£º
[url]http://wiki.forum.nokia.com/index.php/How_to_parse_XML_fi ......

ģʽºÍxmlѧϰ£¨2£©

Ò»£ºÉè¼Æģʽ²¿·Ö
״̬ģʽ£¨state£©
״̬ģʽÀàËÆÓÚÒ»ÖÖ¼òµ¥µÄ¹¤×÷Á÷£¬ÓÃÀ´°Ñ´óÁ¿µÄÅжϷÖÖ§½øÐвð·Ö£¬¸øÿһÖÖÅжÏÔö¼ÓÒ»¸ö״̬£¬Èç¹û²»Âú×ã¸ÃÅжϿÉÒÔ½øÐÐ״̬ת»»£¬ÖªµÀÓöµ½Âú×ãÌõ¼þΪֹ
ÕâÑù×öµÄºÃ´¦¾ÍÊÇ£¬µ±ÐèÒªÔö¼ÓÅжϵÄʱºò£¬²»ÐèÒª¸Ä±äÒѾ­´æÔڵĴúÂë¡£Ö»ÐèÒªÔö¼ÓÅжϵÄÀ࣬ԭʼÅжÏÀàÖÐÔö¼ÓеÄ״̬ת»»¡£
Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ