解析Java中的xml文件 [英] parse the xml file in java
本文介绍了解析Java中的xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的xml文件是
My xml file is
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<User>
<UserName>naveen712</UserName>
<Password>123456</Password>
<RollNo>02098100</RollNo>
<FirstName>naveen</FirstName>
<LastName>chowdary</LastName>
<Email>naveenchowdary712@yahoo.com</Email>
<Cell>9700787455</Cell>
<Phone>9866511568</Phone>
</User>
我想从该文件中检索密码值.我该如何在Java中做到这一点?
I want to retrieve the password value from this file. How can i do that in java??
推荐答案
您需要做的只是 ^ ],在这里:
读取XML文件的简单方法Java [ XML和Java-使用Java教程解析XML [如何在Java中读取XML文件-(DOM解析器) [ ^ ]
试试吧!
All you needed was to Google[^], here:
A simple way to read an XML file in Java[^]
XML and Java - Parsing XML using Java Tutorial[^]
How to read XML file in Java – (DOM Parser)[^]
Try!
这篇关于解析Java中的xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文