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

xml½âÎö

xml
<mime>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009101410241364.txt</text>
</content>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009101410241364.txt</text>
</content>
</mime>
½âÎö
  XmlDocument myDoc = new XmlDocument();
                myDoc.LoadXml(xmlcontent);
                //ËÑË÷Ö¸¶¨µÄ½Úµã
                System.Xml.XmlNodeList mimenodes = myDoc.SelectNodes("//content");
                for (int i = 0; i < mimenodes.Count; i++)
                {
                    string type = mimenodes[i].FirstChild.InnerText;//»ñÈ¡contentϵĵÚÒ»¸ö½Úµã
                    string text = mimenodes[i].LastChild.InnerText;//»ñÈ¡contentϵÄ×îºóÒ»¸ö½Úµã
                }


Ïà¹ØÎĵµ£º

¶¯Ì¬´´½¨XMLÎĵµ


var createXML = function (str) {
if (typeof DOMParser !== "undefined") {
return (new DOMParser()).parsefromString(str, "application/xml");
}else if (typeof ActiveXObject != "undefined") {
if (typeof arguments.callee.activeXString !== "string" ......

dom4jÓÃXPath½âÎöxml Óöµ½µÄÎÊÌâ

ʹÓÃdom4j½âÎöXMLʱ£¬Òª¿ìËÙ»ñȡij¸ö½ÚµãµÄÊý¾Ý£¬Ê¹ÓÃXPathÊǸö²»´íµÄ·½·¨£¬dom4jµÄ¿ìËÙÊÖ²áÀïÒ²½¨ÒéʹÓÃÕâÖÖ·½Ê½£¬±êÌⶼдµÄÕâôÀ«Æø£ºPowerful Navigation with XPath£¬ºÇºÇ¡£
·½·¨ÊÇʹÓÃDocumentµÄselectNodes(String XPath)·½·¨£¬´úÂëд·¨£º
List l = doc.selectNodes("//COLS/COL1");
Ö´ÐÐʱȴÅ׳öÒÔÏÂÒì³££º
Exc ......

XML ¶Á

StringBuilder output = new
StringBuilder();
String xmlString =
@"<bookstore>
<book genre='novel' ISBN='10-861003-324'>
<title>The Handmaid's Tale</title>
<price>19.95</price>
</book>
<book genre='novel' ISBN='1-861001-57-5' ......

JavaÓëXMLÁªºÏ±à³ÌÖ®SAXƪ


SAX¸ÅÄî

SAXÊÇSimple API for XML
µÄËõд£¬Ëü²¢²»ÊÇÓÉW3C¹Ù·½ËùÌá³öµÄ±ê×¼£¬¿ÉÒÔ˵ÊÇ“Ãñ¼ä”µÄÊÂʵ±ê×¼¡£Êµ¼ÊÉÏ£¬ËüÊÇÒ»ÖÖÉçÇøÐÔÖʵÄÌÖÂÛ²úÎï¡£ËäÈ»Èç´Ë£¬ÔÚXMLÖжÔSAXµÄÓ¦ÓÃË¿ºÁ²»±ÈDOMÉÙ£¬¼¸ºõËùÓеÄXML½âÎöÆ÷¶¼»áÖ§³ÖËü¡£

Óë
DOM±È½Ï¶øÑÔ£¬SAXÊÇÒ»ÖÖÇáÁ¿Ð͵ķ½·¨¡£ÎÒÃÇÖªµÀ£¬ÔÚ´¦ÀíDOMµÄʱºò£¬Î ......

JAVA¶ÁXML£ºsax,dom,jdom,dom4jµÄ±È½ÏÒÔ¼°Ñ¡Ôñ(ת)

JAVA¶ÁXML£ºsax,dom,jdom,dom4jµÄ±È½ÏÒÔ¼°Ñ¡Ôñ(ת)
Ô­ÎÄ£ºwww.hicourt.gov.cn/homepage/show9_content.asp
SAX£º                                 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ