解析xml文件以获取clild节点值 [英] Parsing the xml file to get clild node value

查看:91
本文介绍了解析xml文件以获取clild节点值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个xml文件



 <? < span class =code-summarycomment> xml     version   =  1.0   >  
< user >
< user_name > abc < / user_name >
< is_active > 0 < / is_active >
< / user >







现在我想从用户名检查用户是否处于活动状态。怎么摆脱这个?如何检查xml文件中的特定用户名,然后用户是否活动?任何人都可以帮助我吗?

提前谢谢。

解决方案

使用XML解析器: http://php.net/manual/en/book.xml.php [ ^ ]。



-SA

i have an xml file

<?xml version="1.0"?>
  <user>
    <user_name>abc</user_name>
    <is_active>0</is_active>
 </user>




Now i want to check that weather the user is active or not from user name. How to get out of this? How to check in xml file for perticular username and then after user is acive or not? Can any one help me out?
Thanks in advance.

解决方案

Use XML parser: http://php.net/manual/en/book.xml.php[^].

—SA


这篇关于解析xml文件以获取clild节点值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆