Click here to Skip to main content
15,916,692 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: XML file data extraction Pin
Tom Deketelaere14-Oct-09 22:37
professionalTom Deketelaere14-Oct-09 22:37 
GeneralRe: XML file data extraction Pin
nhsal6914-Oct-09 22:58
nhsal6914-Oct-09 22:58 
GeneralRe: XML file data extraction Pin
Tom Deketelaere14-Oct-09 23:44
professionalTom Deketelaere14-Oct-09 23:44 
GeneralRe: XML file data extraction Pin
nhsal6915-Oct-09 3:20
nhsal6915-Oct-09 3:20 
GeneralRe: XML file data extraction Pin
Tom Deketelaere15-Oct-09 3:30
professionalTom Deketelaere15-Oct-09 3:30 
GeneralRe: XML file data extraction Pin
nhsal6915-Oct-09 21:59
nhsal6915-Oct-09 21:59 
GeneralRe: XML file data extraction Pin
Tom Deketelaere15-Oct-09 22:39
professionalTom Deketelaere15-Oct-09 22:39 
GeneralRe: XML file data extraction Pin
nhsal6916-Oct-09 0:42
nhsal6916-Oct-09 0:42 
Thanks again, I would like to point out that your holy memory contains a lot more than my vaguely complete one...

Right this is what I have so far:


Dim odoc As New System.Xml.XmlDocument
                 
odoc.Load("c:\file.xml")
              
Dim fullpath As String = ""
                 
Dim node As System.Xml.XmlNode = odoc.SelectSingleNode("Folder")
                 
fullpath = foldernode.Attributes.GetNamedItem("fullpath").Value
                 
Dim name As String
                 
node = odoc.SelectSingleNode("Name")
name = node.InnerText

Console.Write("Folder: " & fullpath _& " FullPathValue: " & fullpath & " SizeValue: " _& name)
                 
Console.Write(vbCrLf)
                 
Console.Read()
              
Catch errorVariable As Exception
                 
Console.Write(errorVariable.ToString())
Console.Read()

Ignore the Console Write stuff, I just want it to write somthing to the console so that I can see it working...

However, this give an "System.NullReferenceException: Object reference not set to an instance of an object." error for the "foldernode" in the "foldernode.Attributes.Ge....." line.

Any thoughts as to why?
GeneralRe: XML file data extraction Pin
Tom Deketelaere16-Oct-09 1:07
professionalTom Deketelaere16-Oct-09 1:07 
GeneralRe: XML file data extraction Pin
nhsal6916-Oct-09 1:24
nhsal6916-Oct-09 1:24 
GeneralRe: XML file data extraction Pin
Tom Deketelaere16-Oct-09 1:38
professionalTom Deketelaere16-Oct-09 1:38 
GeneralRe: XML file data extraction Pin
nhsal6916-Oct-09 2:20
nhsal6916-Oct-09 2:20 
GeneralRe: XML file data extraction Pin
Tom Deketelaere16-Oct-09 2:35
professionalTom Deketelaere16-Oct-09 2:35 
GeneralRe: XML file data extraction Pin
nhsal6916-Oct-09 2:51
nhsal6916-Oct-09 2:51 
GeneralRe: XML file data extraction Pin
Tom Deketelaere16-Oct-09 3:20
professionalTom Deketelaere16-Oct-09 3:20 
GeneralRe: XML file data extraction Pin
nhsal6916-Oct-09 4:28
nhsal6916-Oct-09 4:28 
GeneralRe: XML file data extraction Pin
Tom Deketelaere16-Oct-09 4:34
professionalTom Deketelaere16-Oct-09 4:34 
GeneralRe: XML file data extraction Pin
nhsal6916-Oct-09 5:48
nhsal6916-Oct-09 5:48 
GeneralRe: XML file data extraction Pin
nhsal6919-Oct-09 5:02
nhsal6919-Oct-09 5:02 
GeneralRe: XML file data extraction Pin
nhsal6921-Oct-09 4:40
nhsal6921-Oct-09 4:40 
QuestionVBA: Microsoft Office Outlook: Find duplicate messages Pin
Jwalant Natvarlal Soneji14-Oct-09 19:54
Jwalant Natvarlal Soneji14-Oct-09 19:54 
AnswerRe: VBA: Microsoft Office Outlook: Find duplicate messages Pin
Dave Kreskowiak15-Oct-09 3:55
mveDave Kreskowiak15-Oct-09 3:55 
QuestionRe: VBA: Microsoft Office Outlook: Find duplicate messages Pin
Jwalant Natvarlal Soneji15-Oct-09 7:36
Jwalant Natvarlal Soneji15-Oct-09 7:36 
AnswerRe: VBA: Microsoft Office Outlook: Find duplicate messages Pin
Dave Kreskowiak15-Oct-09 8:01
mveDave Kreskowiak15-Oct-09 8:01 
GeneralRe: VBA: Microsoft Office Outlook: Find duplicate messages Pin
Jwalant Natvarlal Soneji15-Oct-09 8:40
Jwalant Natvarlal Soneji15-Oct-09 8:40 

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.