public class XmlParse
{
public INodeBuilder NodeBuilder;
public bool Parse(string FilePath)
{
try
{
XmlDocument Xmldoc = new XmlDocument();
Xmldoc.Load(FilePath); //读取文件
XmlNodeList Nodelist = Xmldoc.DocumentElement.ChildNodes;
foreach (XmlNode XNode in Nodelist)
{
NodeBuilder.CreateNode(XNode);
}
}
catch (Exception e)
{
MessageBox.Show(e.Message, "XML File Read Error!");
return false;
}
return true;
相关问答:
HTML code:
<div id="tessx">
<ALEXA VER="0.9" URL="163.com/" HOME="0" AID="=">
<RLS PREFIX="http://" more="79" ......
<?xml version="1.0" encoding="gb2312" ?>
<sites>
<site>
<name>.Net开发者园地</name>
<url>http://dotnet.aspx.cc</url>
<img&g ......
Java code:
/**
* 设置指定的元素名和节点索引所对应节点的内容
* @param 元素名
* @param 节点索引
* @param 内容
*/
public void setElementContent(String elementName,in ......
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<video>
<device deviceid="\\?\usb#vid_0c45&pid_613b#5&2d0620de& ......