随笔分类 -  xml

摘要:原文地址:http://www.cnblogs.com/lgcf/archive/2009/09/25/1573863.htmltest.pyfrom xml.dom.minidom import parse,parseStringclass XmlConfig: def __init__(self,path): self.xmlData=self.GetXml(path) def GetText(self,nodelist): r="" for nxd in nd.childNodes: ... 阅读全文
posted @ 2011-09-23 17:18 wangkangluo1 阅读(4127) 评论(0) 推荐(0) 编辑
摘要:xml参考地址:http://jianlee.ylinux.org/Computer/C/libxml.html实例:/* * ===================================================================================== * * Filename: xml.c * * Description: * * Version: 1.0 * Created: 07/07/2011 11:47:54 AM * Revision: none * Compiler: gcc * * Author: kangle.wang (mn), 阅读全文
posted @ 2011-07-06 11:37 wangkangluo1 阅读(1409) 评论(0) 推荐(0) 编辑
摘要:1.php<?php$xmlStr =file_get_contents("1.xml");$dom = new DOMDocument('1.0');$dom ->loadXML($xmlStr);$xml = simplexml_import_dom($dom);$xpath = new DOMXPath($dom);$emps=$xpath->query("/root/members/member/name");echo $emps->item(0)->nodeValue;$emps->item( 阅读全文
posted @ 2011-06-09 21:04 wangkangluo1 阅读(248) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示