c#生成xml文件问题 - .NET技术 / C#
<?xml version='1.0' encoding='UTF-8'?>
<tupian>
<tupian filename="a0.jpg" label="0商店名zi" url="http://www.baidu.com.cn" />
</tupian>
我想用c#生成这种格式的xml文件,请大侠们帮忙!
我现在只能生成 <tupian filename="a0.jpg"/> 这种格式的,tupian标签里只有一项!
贴一点你的代码。。。
这些数据完全手写的还是从哪获取的?
可以参考一下这个
C# code:
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.NewLineOnAttributes = true;
XmlWriter writer = XmlWriter.Create("e:\\bppknew.xml", settings);
writer.WriteStartDocument();
writer.WriteStartElement("book");
writer.WriteAttributeString("gnere", "Mystery");
writer.WriteAttributeString("publicationdate", "2001");
相关问答:
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
有一10*10矩阵,除去第一个点(0,0)和最后一点(9,9),还有八个点为1,其他都为0,要求用二维数组表示。八个点是随机生成的,编写相关程序表示矩阵所有可能情况。
真心求教各位高手,哎!本人太菜了!呵呵!
......
<?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......
在根目录/lib中存放一个log.c,log.h,并用下面的语句:
gcc -c log.c
ar crv liblog.a log.o
编译出一个liblog.a静态库,然后在文件夹:/testfile中创建一个test.c和testc.c,test.c中引用了testc.c中定义的方法 ......
谁能帮我把下面这些代码改成VB形式的,多谢了,急用~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......