c# xml 的AppendChild问题 - .NET技术 / C#
C# code:
//代码如下:正常运行,就是添加到xml里后,显示没有 "</PlugInFile>"
try
{
string path = Application.StartupPath + (@"\PlugIn.xml");
XmlDocument doc = new XmlDocument();
doc.Load(path);
XmlNode node = doc.SelectSingleNode("PlugIn/PlugInConfig");
if (node == null)
return;
XmlElement ent = doc.CreateElement("PlugInFile");
ent.SetAttribute("text", 123);
ent.SetAttribute("ImpementInterface", 123);
ent.SetAttribute("ClassName", 123);
// XmlElement notexml = doc.CreateElement("Note");
// notexml.InnerText = this.txtnote.Text;
// node.AppendChild(notexml);
node.AppendChild(ent);
doc.Save(path);
MessageBox.Show("YES");
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
xml数据:
XML code:
<?xml version="1.0" encoding="utf-8"?>
<PlugIn>
<Plug
相关问答:
如题,C/C++中的execl怎么调用写好的java程序,
execl("/opt/java1.5/bin/java","MyClass",NULL);
这样的不行哦。
不会.
运行java程序
找工具查看一下那个程序的命令行
搜索下:jni ......
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' 打开刚创建的文件。
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' 读入所有字符到变量中 ......
挺繁琐,之前发的帖子,分值太低现在重发一个。欢迎各位大侠~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......
公司开发一个触摸屏程序,我负责的一块,实现这样一个功能,当鼠标点击窗口中图片(一张图分成几部分)的其中一部分时,将这部分图片截取出来,弹出新的窗口,将截取出的图片显示出来。我使用Rectange类控制了返回, ......