Click here to Skip to main content
14,385,458 members
   

C#

 
QuestionVery simple Async Client/Server Pin
Member 1450684320-Jun-19 3:59
MemberMember 1450684320-Jun-19 3:59 
AnswerRe: Very simple Async Client/Server Pin
OriginalGriff20-Jun-19 4:56
mveOriginalGriff20-Jun-19 4:56 
AnswerRe: Very simple Async Client/Server Pin
Mycroft Holmes20-Jun-19 15:37
MemberMycroft Holmes20-Jun-19 15:37 
AnswerRe: Very simple Async Client/Server Pin
jschell23-Jun-19 7:08
Memberjschell23-Jun-19 7:08 
Questionhow to create a chat application that a private chat user with a c # mvc Pin
xuannam12039220-Jun-19 1:59
Memberxuannam12039220-Jun-19 1:59 
AnswerRe: how to create a chat application that a private chat user with a c # mvc Pin
OriginalGriff20-Jun-19 2:03
mveOriginalGriff20-Jun-19 2:03 
AnswerRe: how to create a chat application that a private chat user with a c # mvc Pin
#realJSOP20-Jun-19 2:23
mve#realJSOP20-Jun-19 2:23 
Questionretrieval of XML information & Copy to excel Files Pin
Member 1450608919-Jun-19 14:18
MemberMember 1450608919-Jun-19 14:18 
206/5000
Hello everyone ,

I am trying to retrieve XML information, I managed to recover the attributes against the childrens they are not recovering below my code and the form of my XML file:


XML template :

<?xml version="1.0" encoding="utf-8"?>
<Root>
<ToolsList>
<Tool PartNumber="0018B">
<ToolLine Text=" FI : 3897" />
<ToolLine Text=" PINCE1 Reference : M 22520/2.01" />
<ToolLine Text=" Position : 2.02" />
<ToolLine Text=" Reglage : 7" />
<ToolLine Text=" PINCE2 Reference: M 22520/7.01" />
</Tool>
</ToolsList>
</Root>

Code C#:

Imports System.IO
Imports System.Xml
Module ParsingUsingXmlDocument
Sub Main()
Try
Dim m_xmld As XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
'Create the XML Document
m_xmld = New XmlDocument()
'Load the Xml file
m_xmld.Load("D:\Users\Desktop\Xml to excel chahine\U881A1013_105_A_PREP_1.xml")
m_nodelist = m_xmld.SelectNodes("/Root/ToolsList/PartNumber")
'Loop through the nodes
For Each m_node In m_nodelist
Dim partnumber = m_node.Attributes.GetNamedItem("PartNumber").Value
'Get the firstName Element Value
Dim text1 = m_node.ChildNodes.Item(0).InnerText
Dim text2 = m_node.ChildNodes.Item(1).InnerText
Dim text3 = m_node.ChildNodes.Item(2).InnerText
Dim text4 = m_node.ChildNodes.Item(3).InnerText
Console.Write("partnumber: " & partnumber _
& " text1: " & text1 & " text3: " _
& text3)
Console.Write(vbCrLf)
Next
Catch errorVariable As Exception
'Error trapping
Console.Write(errorVariable.ToString())
End Try
End Sub
End Module


if you have any ideas do not hesitate to help me, thanks in advance

after a question how can I implement this information on an excel file

AnswerRe: retrieval of XML information & Copy to excel Files Pin
OriginalGriff19-Jun-19 20:59
mveOriginalGriff19-Jun-19 20:59 
Questionsome bugs don't retire II: DataContract.ReadObject (includes solution by Richard Deeming) Pin
BillWoodruff18-Jun-19 18:43
mveBillWoodruff18-Jun-19 18:43 
AnswerRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 21:46
mveRichard MacCutchan18-Jun-19 21:46 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff18-Jun-19 22:03
mveBillWoodruff18-Jun-19 22:03 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 22:18
mveRichard MacCutchan18-Jun-19 22:18 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff18-Jun-19 22:54
mveBillWoodruff18-Jun-19 22:54 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 22:58
mveRichard MacCutchan18-Jun-19 22:58 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff18-Jun-19 23:04
mveBillWoodruff18-Jun-19 23:04 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 23:39
mveRichard MacCutchan18-Jun-19 23:39 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard Deeming19-Jun-19 1:57
mveRichard Deeming19-Jun-19 1:57 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff19-Jun-19 5:24
mveBillWoodruff19-Jun-19 5:24 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard Deeming19-Jun-19 6:04
mveRichard Deeming19-Jun-19 6:04 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff19-Jun-19 13:05
mveBillWoodruff19-Jun-19 13:05 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan21-Jun-19 23:01
mveRichard MacCutchan21-Jun-19 23:01 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff21-Jun-19 23:09
mveBillWoodruff21-Jun-19 23:09 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan21-Jun-19 23:34
mveRichard MacCutchan21-Jun-19 23:34 
AnswerRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
F-ES Sitecore19-Jun-19 0:51
mveF-ES Sitecore19-Jun-19 0:51 

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.