Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
QuestionWhat's the best strategy? Pin
wapgagtp5-Sep-03 6:11
wapgagtp5-Sep-03 6:11 
GeneralWebservice moved Pin
Anonymous5-Sep-03 5:50
Anonymous5-Sep-03 5:50 
GeneralRe: Webservice moved Pin
SimonS5-Sep-03 6:33
SimonS5-Sep-03 6:33 
GeneralKeeping Datagrid in sync with back button Pin
clayne5-Sep-03 4:56
clayne5-Sep-03 4:56 
GeneralApplication Data Pin
Davy Mitchell5-Sep-03 1:58
Davy Mitchell5-Sep-03 1:58 
GeneralRe: Application Data Pin
Mazdak5-Sep-03 3:08
Mazdak5-Sep-03 3:08 
GeneralRe: Application Data Pin
Davy Mitchell5-Sep-03 10:15
Davy Mitchell5-Sep-03 10:15 
Questionhow can create a xml document? Pin
zecodela4-Sep-03 21:51
zecodela4-Sep-03 21:51 
hi,
i want to create a xml document like b4 format. i did sth with xmlnode, xmldocument... but, i still can't add attribute to "chartdataisland"...

can anyone help?

XML Doc:
<?xml version="1.0" encoding="utf-8" ?>
<chartdatalist>
<chartdataisland legend="Phase 01">
<chartdata>
<x>5</x>
<y>73.3</y>
</chartdata>
</chartdataisland>
<chartdataisland legend="Phase 02">
<chartdata>
<x>5</x>
<y>23.3</y>
</chartdata>
</chartdataisland>
<chartdataisland legend="Phase 03">
<chartdata>
<x>5</x>
<y>12.3</y>
</chartdata>
</chartdataisland>
</chartdatalist>

CODE:
XmlDocument doc = new XmlDocument();
doc.LoadXml("<?xml version=\"1.0\"?>" + "<chartdatalist>"+"</chartdatalist>");

XmlNode dataislandElem = doc.CreateNode(XmlNodeType.Element, "chartdataisland", "");

XmlNode dataElem = doc.CreateNode(XmlNodeType.Element, "chartdata", "");

XmlNode XElem = doc.CreateNode(XmlNodeType.Element, "x", "");
XElem.InnerText="12";
XmlNode YElem = doc.CreateNode(XmlNodeType.Element, "y", "");
YElem.InnerText="24";

dataElem.AppendChild(XElem);
dataElem.AppendChild(YElem);

dataislandElem.AppendChild(dataElem);

XmlElement root = doc.DocumentElement;
root.AppendChild(dataElem);
AnswerRe: how can create a xml document? Pin
freshthinking4-Sep-03 22:28
freshthinking4-Sep-03 22:28 
AnswerRe: how can create a xml document? Pin
Mazdak4-Sep-03 22:39
Mazdak4-Sep-03 22:39 
AnswerRe: how can create a xml document? Pin
Manster5-Sep-03 9:09
Manster5-Sep-03 9:09 
QuestionSend an email from a Form? Pin
Bog4-Sep-03 19:58
Bog4-Sep-03 19:58 
AnswerRe: Send an email from a Form? Pin
David Stone4-Sep-03 20:07
sitebuilderDavid Stone4-Sep-03 20:07 
GeneralRe: Send an email from a Form? Pin
Bog5-Sep-03 9:34
Bog5-Sep-03 9:34 
AnswerRe: Send an email from a Form? Pin
Nick Seng4-Sep-03 21:14
Nick Seng4-Sep-03 21:14 
GeneralRe: Send an email from a Form? Pin
Bog5-Sep-03 9:32
Bog5-Sep-03 9:32 
AnswerRe: Send an email from a Form? Pin
Manster5-Sep-03 9:06
Manster5-Sep-03 9:06 
GeneralRe: Send an email from a Form? Pin
Bog5-Sep-03 9:28
Bog5-Sep-03 9:28 
GeneralUpdating a class wrapper around a table Pin
Ista4-Sep-03 13:56
Ista4-Sep-03 13:56 
GeneralParagraph Selection in richtextbox Pin
opherg4-Sep-03 10:26
opherg4-Sep-03 10:26 
GeneralWebPage in C# Windows application Pin
yyf4-Sep-03 9:21
yyf4-Sep-03 9:21 
GeneralRe: WebPage in C# Windows application Pin
Kannan Kalyanaraman4-Sep-03 21:43
Kannan Kalyanaraman4-Sep-03 21:43 
GeneralRe: WebPage in C# Windows application Pin
Corinna John5-Sep-03 1:01
Corinna John5-Sep-03 1:01 
GeneralRe: WebPage in C# Windows application Pin
yyf5-Sep-03 10:08
yyf5-Sep-03 10:08 
GeneralRe: WebPage in C# Windows application Pin
Ista8-Sep-03 3:58
Ista8-Sep-03 3:58 

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

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