C# code:
strXml="
<ListConferenceResponse xmlns="http://mediax.huawei.com/webservice/types">
<code xmlns="">200</code>
<description xmlns="">Success</description>
</ListConferenceResponse>
";
XmlDocument xmlDocument ......
远程读取
C# code:
XmlReader xmlReader = XmlReader.Create("http://google.com/complete/search?output=toolbar&q="+Keyword);
XML内容为
XML code:
<?xml version="1.0" ?>
- <toplevel>
- <CompleteSuggestion>
<suggestion data="123" /& ......
我有获取到一个xml格式的字符串 strXml:
XML code:
string strXml="
<ListConferenceResponse xmlns="http://mediax.huawei.com/webservice/types">
<description xmlns="">Success</description>
<page xmlns="">
<index>1</index>
< ......
Java code:
Element urlCategory=book.getChild("urlCategory");
List content=urlCategory.getContent();
Iterator iterator=content.iterator();
while(iterator.hasNext())
{
Element urlCategoryElement=(Element) iterator.next ......
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<id="1">
<user="test1" pass="12345" />
</id>
<id="2">
<user="test2" pass="6789&q ......
如题,我想用dom4j来读取xml的文件
public Document read(String fileName) throws MalformedURLException, DocumentException {
SAXReader reader = new SAXReader();
Document document = reader.read(new File(fileName));
return document;
}
这样的方法,貌似只能加载“D:\test\1. ......
总记录数:834; 总页数:139; 每页6 条;
首页 上一页 [1] [2] 3
[4] [5] [6] [7] [8] [9] [10] 下一页 尾页