Click here to Skip to main content
11,492,639 members (60,575 online)
Click here to Skip to main content

How to manage the xml files

, 6 Aug 2006 16.4K 116 15
Rate this:
Please Sign up or sign in to vote.
You can use this class to manage the xml files
  • <A href="XmlControl/XmlControl_src.zip"></A><A href="XmlControl/XmlControl_src.zip"></A><A href="http://www.codeproject.com/useritems/XmlControl/20060805.zip">Download source files - 9.66 Kb</A> 

Introduction

I found use the .net framework to manage the xml is very dificult. but the .net framework is had a lot of functions. This XmlControl's function is less, but I think that's enough to manage the xml files in commonly.

If you want to use this control to manage an exit xml file, you can use folow example to use.

<BR>XmlControl fileCon=new XmlControl("filePath");

If you want to create an new xml file, you can use this

XmlControl fileCon=new XmlControl();

You must set the XmlControl's RootNode like this

fileCon.RootNode.Name="example";

You can't to save the file that you can't set the RootNode's name.

You can use the XmlControl.Elements.Add() method to add an xml node, like this

<BR>XmlElement elem=new XmlElement(); <BR>elem.Name="example"; <BR>elem.Value="example"; <BR>fileCon.Elements.Add(example);

If you can't understand, you can use the Email to connect me. Because my english is poor so ......  ^_^

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

zhengxiaobao
Web Developer
China China
Deverloper

Comments and Discussions

 
Generalvote of 1 Pin
rootjumper1-Sep-09 11:06
memberrootjumper1-Sep-09 11:06 
GeneralThanks Pin
norm .net7-Aug-06 0:22
membernorm .net7-Aug-06 0:22 
GeneralRe: Thanks Pin
Robert Rohde7-Aug-06 4:29
memberRobert Rohde7-Aug-06 4:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150520.1 | Last Updated 7 Aug 2006
Article Copyright 2006 by zhengxiaobao
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid