Click here to Skip to main content
15,921,452 members
Home / Discussions / C#
   

C#

 
QuestionHow to write a C# dll to be called in Delphi7 Pin
luvcloud2-Oct-06 17:17
luvcloud2-Oct-06 17:17 
AnswerRe: How to write a C# dll to be called in Delphi7 Pin
Nader Elshehabi2-Oct-06 18:28
Nader Elshehabi2-Oct-06 18:28 
GeneralRe: How to write a C# dll to be called in Delphi7 Pin
luvcloud2-Oct-06 18:34
luvcloud2-Oct-06 18:34 
GeneralRe: How to write a C# dll to be called in Delphi7 Pin
Nader Elshehabi2-Oct-06 19:07
Nader Elshehabi2-Oct-06 19:07 
GeneralRe: How to write a C# dll to be called in Delphi7 Pin
Tim Wri2-Oct-06 23:05
Tim Wri2-Oct-06 23:05 
QuestionCrystal Reports single field Pin
StyrofoamSUV2-Oct-06 17:17
StyrofoamSUV2-Oct-06 17:17 
AnswerRe: Crystal Reports single field Pin
StyrofoamSUV4-Oct-06 7:55
StyrofoamSUV4-Oct-06 7:55 
Questionremoving xml attributes [modified] Pin
lagumaster2-Oct-06 16:16
lagumaster2-Oct-06 16:16 
hi everyone,

i want to get all the attributes of an element and put them under that element. but i don't know why at some elements their attributes are displayed beside it and i want to get rid of the namespace too. see the code below and tell me what's wrong with it.

private void populateTreeView(XmlNode node2Iterate, TreeNode currNode)
{
XmlNode xNode;
TreeNode tNode;
XmlNodeList nodeList;
TreeNode attrNode = new TreeNode();

if (node2Iterate.HasChildNodes)
{
nodeList = node2Iterate.ChildNodes;
for(int i = 0; i<=nodeList.Count - 1; i++)
{
TreeNode tn;
xNode = node2Iterate.ChildNodes[i];
tn = new TreeNode("<" + xNode.Name + ">");

currNode.Nodes.Add(tn);
tNode = currNode.Nodes[i];
populateTreeView(xNode, tNode);

if(node2Iterate.ChildNodes[i].Attributes != null)
{
foreach(XmlAttribute attr in node2Iterate.ChildNodes[i].Attributes)
{
string attrs = null;
attrs = "<" + attr.Name + "=\"" + attr.Value + "\"" +">";
currNode.Nodes[i].Nodes.Add(attrs);
}
}
}
}
else
{
currNode.Text = (node2Iterate.OuterXml).Trim();
}
}

the output looks like this on a treeView control:
-<ns:element attr1="a" attr2="b" xmlns:ns="http://testing.com">
-<attr1="a">
-<attr2="b">

thanks for any help!


-- modified at 23:41 Monday 2nd October, 2006
AnswerRe: removing xml attributes Pin
Stefan Troschuetz2-Oct-06 21:21
Stefan Troschuetz2-Oct-06 21:21 
GeneralRe: removing xml attributes Pin
lagumaster3-Oct-06 17:23
lagumaster3-Oct-06 17:23 
QuestionHow should I implement throttling an application's bandwidth using c#? [modified] Pin
suchnight2-Oct-06 15:31
suchnight2-Oct-06 15:31 
AnswerRe: How should I implement throttling an application's bandwidth using c#? Pin
Nader Elshehabi2-Oct-06 16:00
Nader Elshehabi2-Oct-06 16:00 
QuestionHow to print Form ? Pin
hdv2122-Oct-06 11:15
hdv2122-Oct-06 11:15 
AnswerRe: How to print Form ? Pin
Nader Elshehabi2-Oct-06 12:46
Nader Elshehabi2-Oct-06 12:46 
AnswerRe: How to print Form ? Pin
S. Senthil Kumar2-Oct-06 23:50
S. Senthil Kumar2-Oct-06 23:50 
GeneralRe: How to print Form ? Pin
hdv2123-Oct-06 1:19
hdv2123-Oct-06 1:19 
GeneralRe: How to print Form ? Pin
S. Senthil Kumar3-Oct-06 1:25
S. Senthil Kumar3-Oct-06 1:25 
QuestionDesign issue with unexpected requirement [modified] Pin
Alaric_2-Oct-06 10:53
professionalAlaric_2-Oct-06 10:53 
QuestionThree Questions - Restricted Window & Forms's Order Level & Chart Pin
digitalhand2-Oct-06 9:24
digitalhand2-Oct-06 9:24 
AnswerRe: Three Questions - Restricted Window & Forms's Order Level & Chart Pin
Andrew Rissing2-Oct-06 9:58
Andrew Rissing2-Oct-06 9:58 
AnswerRe: Three Questions - Restricted Window & Forms's Order Level & Chart Pin
Nader Elshehabi2-Oct-06 14:18
Nader Elshehabi2-Oct-06 14:18 
AnswerRe: Three Questions - Restricted Window & Forms's Order Level & Chart Pin
digitalhand4-Oct-06 2:51
digitalhand4-Oct-06 2:51 
QuestionFriends...I need some help Pin
OMalleyW2-Oct-06 9:05
OMalleyW2-Oct-06 9:05 
AnswerRe: Friends...I need some help Pin
Nader Elshehabi2-Oct-06 12:56
Nader Elshehabi2-Oct-06 12:56 
QuestionWriting redirected output from an unmanaged executable to a windows form control Pin
erikash2-Oct-06 7:36
erikash2-Oct-06 7:36 

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.