Click here to Skip to main content
15,920,896 members
Home / Discussions / C#
   

C#

 
QuestionStruct vs array performance Pin
Lutosław28-Jan-09 2:25
Lutosław28-Jan-09 2:25 
AnswerRe: Struct vs array performance Pin
SeMartens28-Jan-09 2:44
SeMartens28-Jan-09 2:44 
GeneralRe: Struct vs array performance Pin
User 665828-Jan-09 3:02
User 665828-Jan-09 3:02 
GeneralRe: Struct vs array performance Pin
SeMartens28-Jan-09 3:14
SeMartens28-Jan-09 3:14 
GeneralRe: Struct vs array performance Pin
User 665828-Jan-09 3:23
User 665828-Jan-09 3:23 
AnswerRe: Struct vs array performance Pin
C Change28-Jan-09 3:09
C Change28-Jan-09 3:09 
AnswerRe: Struct vs array performance Pin
Ennis Ray Lynch, Jr.28-Jan-09 4:02
Ennis Ray Lynch, Jr.28-Jan-09 4:02 
Questionxml data Pin
arkiboys28-Jan-09 1:47
arkiboys28-Jan-09 1:47 
I have made changes to code with the help of another developer...
This code does not seem to be working fine when there are multiple <NODE> tags
Do you see what the problem is please?
The xml is below:
Thanks

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("XMLFile1.xml");

XmlNode bNode = xmlDoc.SelectSingleNode("BIBLE");

string strBibleClientID = xmlDoc.DocumentElement.GetAttribute("CLIENT_ID");
string strBibleMatterID = xmlDoc.DocumentElement.GetAttribute("MATTER_ID");
string strBibleDocNumber = xmlDoc.DocumentElement.GetAttribute("DOCNUMBER");

XmlNodeList nodes = xmlDoc.SelectNodes("/BIBLE/NODE");

foreach (XmlNode node in nodes)
{
XmlNodeList docs = node.SelectNodes("./DOC");

foreach (XmlNode doc in docs)
{
string clientID = doc.Attributes["CLIENT_ID"].Value;
string matterID = doc.Attributes["MATTER_ID"].Value;
string docName = doc.Attributes["DOCNAME"].Value;
string docNumber = doc.Attributes["DOCNUMBER"].Value;
}
}

<?xml version="1.0" encoding="utf-8" ?>
<BIBLE MATTER_ID="00123" CLIENT_ID="12345" DOCNUMBER="65476">
some text here
<DOC CLIENT_ID="12345" MATTER_ID="00123" DOCNAME="first Document name" DOCNUMBER="12346">
</DOC>
<NODE>
<![CDATA[some text:]]>
<DOC CLIENT_ID="12345" MATTER_ID="00123" DOCNAME="another name" DOCNUMBER="12346A">
</DOC>
</NODE>

<NODE>
<![CDATA[Authorisations:]]>
<NODE><![CDATA[something:]]>
<DOC CLIENT_ID="12345" MATTER_ID="00123" DOCNAME="second document name" DOCNUMBER="12347">
</DOC>
<DOC CLIENT_ID="12345" MATTER_ID="00123" DOCNAME="third document name" DOCNUMBER="12348">
</DOC>
</NODE>
</NODE>
<NODE>
<![CDATA[ok data:]]>
<DOC CLIENT_ID="12345" MATTER_ID="00123" DOCNAME="a name here" DOCNUMBER="12345">
</DOC>
</NODE>
</BIBLE>
AnswerRe: xml data Pin
SeMartens28-Jan-09 1:51
SeMartens28-Jan-09 1:51 
GeneralRe: xml data Pin
arkiboys28-Jan-09 2:01
arkiboys28-Jan-09 2:01 
QuestionUML Modelling of C# / .NET Windows Apps? Pin
C Change28-Jan-09 0:28
C Change28-Jan-09 0:28 
QuestionDownloadfile issue from server Pin
ashok_rgm28-Jan-09 0:15
ashok_rgm28-Jan-09 0:15 
AnswerRe: Downloadfile issue from server Pin
Manas Bhardwaj28-Jan-09 0:28
professionalManas Bhardwaj28-Jan-09 0:28 
GeneralRe: Downloadfile issue from server Pin
ashok_rgm28-Jan-09 0:54
ashok_rgm28-Jan-09 0:54 
AnswerRe: Downloadfile issue from server Pin
Aman Bhullar28-Jan-09 1:31
Aman Bhullar28-Jan-09 1:31 
Questionhow to do a multi task on a single button click Pin
sandhya1427-Jan-09 23:53
sandhya1427-Jan-09 23:53 
AnswerRe: how to do a multi task on a single button click Pin
rah_sin27-Jan-09 23:58
professionalrah_sin27-Jan-09 23:58 
GeneralRe: how to do a multi task on a single button click Pin
sandhya1428-Jan-09 0:04
sandhya1428-Jan-09 0:04 
GeneralRe: how to do a multi task on a single button click Pin
sandhya1428-Jan-09 0:20
sandhya1428-Jan-09 0:20 
AnswerRe: how to do a multi task on a single button click Pin
DaveyM6928-Jan-09 0:04
professionalDaveyM6928-Jan-09 0:04 
GeneralRe: how to do a multi task on a single button click Pin
sandhya1428-Jan-09 0:18
sandhya1428-Jan-09 0:18 
GeneralRe: how to do a multi task on a single button click Pin
DaveyM6928-Jan-09 0:32
professionalDaveyM6928-Jan-09 0:32 
Questionhow can i send file name to desktop application Pin
ahmedhassan9627-Jan-09 23:51
ahmedhassan9627-Jan-09 23:51 
AnswerRe: how can i send file name to desktop application Pin
Michael Bookatz28-Jan-09 0:17
Michael Bookatz28-Jan-09 0:17 
GeneralRe: how can i send file name to desktop application Pin
ahmedhassan9628-Jan-09 0:42
ahmedhassan9628-Jan-09 0:42 

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.