| View previous topic :: View next topic |
| Author |
Message |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Wed Dec 10, 2008 7:39 pm Post subject: XML Load / Parse |
|
|
| How can I read from an XML file? I'd like to find the tag <>, then read the value until (obviously) the </>.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Dec 10, 2008 8:52 pm Post subject: |
|
|
I asked Irwin about this a while ago, use this:
XmlLite
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Wed Dec 10, 2008 9:38 pm Post subject: |
|
|
| Thanks lurc, but I was thinking of actually hard-coding it. Therefore, I could use the search and replace function for other things if needed.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Dec 11, 2008 6:35 am Post subject: |
|
|
Then you could use _tcsrchr to find occurences of '<' and '>' characters and work from that.
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Thu Dec 11, 2008 3:48 pm Post subject: |
|
|
| Thank you much lurc. Can I add you on MSN?
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Dec 11, 2008 4:18 pm Post subject: |
|
|
Sure, but I'm hardly on it.
Add anyways, but if you really need me PM cause I actually visit CEF
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Fri Dec 12, 2008 11:02 pm Post subject: |
|
|
| How about replacing the text that's found?
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sat Dec 13, 2008 3:18 pm Post subject: |
|
|
Well that's a bit more tricky cause you have to completely push back the entire rest of the file so say you find '<' then '=' you would modify the sting 1 place after that pointer and then get the length of the data your inserting and push back that entire data after the length of the data minus the length of what Is already there
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Mon Dec 15, 2008 5:16 pm Post subject: |
|
|
| Thanks; I'll try it.
|
|
| Back to top |
|
 |
|