Click here to Skip to main content
15,887,350 members
Home / Discussions / Visual Basic
   

Visual Basic

 
SuggestionRe: MDI Child form background transparent Pin
Maciej Los2-Jul-19 5:37
mveMaciej Los2-Jul-19 5:37 
RantRe: MDI Child form background transparent Pin
Richard Deeming2-Jul-19 5:38
mveRichard Deeming2-Jul-19 5:38 
QuestionInput string was not in a correct format. error message Pin
IC0D330-Jun-19 7:47
IC0D330-Jun-19 7:47 
AnswerRe: Input string was not in a correct format. error message Pin
Dave Kreskowiak30-Jun-19 8:03
mveDave Kreskowiak30-Jun-19 8:03 
AnswerRe: Input string was not in a correct format. error message Pin
Maciej Los30-Jun-19 9:54
mveMaciej Los30-Jun-19 9:54 
QuestionUsing static library in Visual Basic Pin
Member 1451037923-Jun-19 23:05
Member 1451037923-Jun-19 23:05 
AnswerRe: Using static library in Visual Basic Pin
Dave Kreskowiak24-Jun-19 12:18
mveDave Kreskowiak24-Jun-19 12:18 
Questionretrieval of XML information & Copy to excel Files Pin Pin
Member 1450608920-Jun-19 13:29
Member 1450608920-Jun-19 13:29 
Hello everyone ,

I am trying to retrieve XML information, I managed to recover the attributes against the childrens (<pre><ToolLine Text="
)they are not recovering below my code and the form of my XML file:

XML template :


<pre lang="xml">
<?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#:

<pre lang="vb">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 Pin
Richard Deeming21-Jun-19 1:07
mveRichard Deeming21-Jun-19 1:07 
QuestionProblem cropping an image. SOLVED Pin
mo14928-Jun-19 6:07
mo14928-Jun-19 6:07 
AnswerRe: Problem cropping an image. more info Pin
mo14928-Jun-19 9:46
mo14928-Jun-19 9:46 
GeneralRe: Problem cropping an image. more info Pin
Dave Kreskowiak8-Jun-19 16:29
mveDave Kreskowiak8-Jun-19 16:29 
GeneralRe: Problem cropping an image. more info Pin
mo14928-Jun-19 23:34
mo14928-Jun-19 23:34 
AnswerRe: Problem cropping an image. Pin
Gerry Schmitz8-Jun-19 12:05
mveGerry Schmitz8-Jun-19 12:05 
QuestionHow using reflection invoke when method wants a specific object type Pin
Member 85736427-Jun-19 4:45
Member 85736427-Jun-19 4:45 
AnswerRe: How using reflection invoke when method wants a specific object type Pin
Richard Deeming7-Jun-19 4:53
mveRichard Deeming7-Jun-19 4:53 
GeneralRe: How using reflection invoke when method wants a specific object type Pin
Member 85736427-Jun-19 7:07
Member 85736427-Jun-19 7:07 
QuestionHow to change txt color in MessageBox with API Pin
MasterGamerFX30-May-19 23:44
MasterGamerFX30-May-19 23:44 
AnswerRe: How to change txt color in MessageBox with API Pin
Richard Deeming31-May-19 0:46
mveRichard Deeming31-May-19 0:46 
QuestionHow to clear a bindingsource without deleting from database Pin
desanti30-May-19 3:47
desanti30-May-19 3:47 
AnswerRe: How to clear a bindingsource without deleting from database Pin
Richard MacCutchan30-May-19 4:01
mveRichard MacCutchan30-May-19 4:01 
GeneralRe: How to clear a bindingsource without deleting from database Pin
desanti30-May-19 6:58
desanti30-May-19 6:58 
GeneralRe: How to clear a bindingsource without deleting from database Pin
Richard MacCutchan30-May-19 7:01
mveRichard MacCutchan30-May-19 7:01 
GeneralRe: How to clear a bindingsource without deleting from database Pin
desanti30-May-19 8:56
desanti30-May-19 8:56 
GeneralRe: How to clear a bindingsource without deleting from database Pin
Richard MacCutchan30-May-19 21:44
mveRichard MacCutchan30-May-19 21:44 

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.