Okay, so I'm now aware of the fact I need to use TXMLDocument to open a .xml in Delphi 7, but I had a few further questions (hopefully answerable ones that haven't already been answered, I didn't see anything that looked overly helpful)
If I run
tempdoc.LoadFromFile('document.xml');
- just as an example, it throws up an Access Violation, but I'm not sure what I'm doing wrong there. I looked it up, and the violation ends in 00000000, which indicates that it's not able to find the file, which is why I wanted to ask - Do I need to put the entire filepath in theLoadFromFile('')
?If so - I tried to use
tempdoc.LoadFromFile(tempbuffer+'shared.xml')
- where Tempbuffer is the extracted filepath of everything up to that (in this case'C:\users\...\Appdata\Roaming\Skype\'
)I assume, like before, I'm using the part in the wrong way, but as I keep having to point out, this is all new to me. What am I doing wrong here? Is it because of the location of the file, or something else?
I haven't yet investigated it properly, because I'm still trying to work out how to actually read the .xml file, but I assume there's a way I can extract the child node from this:
<?xml version="1.0"?>
<config version="1.0" serial="56" timestamp="1412085296.3">
<Lib>
<Access>
<Cookies>4100</Cookies>
</Access>
<Account>
<Default>[ACCOUNTNAME]</Default>
</Account>
</Lib>
</config>
I'm trying to extract the [ACCOUNTNAME] field from the subnode. Hopefully this is clearer than the previous attempt.
Short version: How does LoadFromFile work? Can I extract a field from a node and turn it into a string?