A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows 7 » Windows 7 Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to Edit an xml file



 
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #16  
Old May 15th 13, 02:24 PM posted to alt.windows7.general
Dave C[_2_]
external usenet poster
 
Posts: 67
Default How to Edit an xml file

On Mon, 13 May 2013 15:03:55 -0400, Zaphod Beeblebrox
wrote:

On Mon, 13 May 2013 14:30:43 -0400, "Dave C" wrote in article
...

I have been playing Win 7, Free Cell for months. I always intended to
retry a given game until I won. On game 2710, I inadvertently accepted
my First Loss.

I now know that my Free Cell stats are stored in an xml file. How
might I edit that file, to edit (delete) that one lose.

While surely minor, compared to many the REAL problems discussed here,
I am most annoyed at myself. I sure would appreciate any/all advice on
how to edit that file.

dave


As I understand it, Free Cell stats are stored in:

C:\Users\your user name\Appdata\Local\Microsoft Games\Freecell\Freecellsettings.xml

To edit it, all you need is notepad or any other text editor.
Then, find the appropriate entry and modify it, then save.


First, a Sincere Thank You, to the many responders. My question is FAR
less important than most other requests on this board.

Certainly I followed up on the various suggestions. I D/L'ed installed
the XML Notepad 2007, as well as another XML editor (Altova XMLSpy
2013) I found on the net. Neither xml editor allows acces to that
file. I have verified that the File Properties are not restricted from
editing. Both editors give me two, most similar error messages:

Sorry file c:\users\ ... \games \freecell \freecellsettings.xml
cannot be opened.

Can't load binary file c:\users\ ... \games \freecell
\freecellsettings.xml

Note: Above, I have truncated the the full file directory info. For
sure I did locate the applicable Frrecell file.

I sure would aprreciate further advice, as to how I can open and edit
that Freecell file, in an xml editor.

Thanks

Ads
  #17  
Old May 15th 13, 02:39 PM posted to alt.windows7.general
Dave C[_2_]
external usenet poster
 
Posts: 67
Default How to Edit an xml file

On Tue, 14 May 2013 22:37:39 -0400, Stan Brown
wrote:

On Mon, 13 May 2013 14:30:43 -0400, Dave C wrote:

I have been playing Win 7, Free Cell for months. I always intended to
retry a given game until I won. On game 2710, I inadvertently accepted
my First Loss.

I now know that my Free Cell stats are stored in an xml file. How
might I edit that file, to edit (delete) that one lose.


Any text editor. Even Notepad should be able to do the job.

Don't double-click the file. Open your editor of choice, and do
File*» Open in the editor menu, or drag the file into the editor's
client area.



Apologies!!

I thought I had updated, to the most recent posts in this newsgroup.
You will note that my reply today was in response to a much earlier
post. I have now read all of the subsequent posts.

BTW: I did open the xml file with Notepad, as well the noted other
two xml specific editors. Notepad did NOT give me any error messages
and it DID open the file. Alas, there were NO identifiable entries
displayed, such that I could edit the file. A non-technical person
might call the display gibberish?

As others have noted, there must be some encoding, that precludes
viewing and editing. For certain I have no idea how to proceed, and
edit that file.
  #18  
Old May 15th 13, 05:13 PM posted to alt.windows7.general
Paul
external usenet poster
 
Posts: 18,275
Default How to Edit an xml file

Dave C wrote:
On Mon, 13 May 2013 15:03:55 -0400, Zaphod Beeblebrox
wrote:

On Mon, 13 May 2013 14:30:43 -0400, "Dave C" wrote in article
...
I have been playing Win 7, Free Cell for months. I always intended to
retry a given game until I won. On game 2710, I inadvertently accepted
my First Loss.

I now know that my Free Cell stats are stored in an xml file. How
might I edit that file, to edit (delete) that one lose.

While surely minor, compared to many the REAL problems discussed here,
I am most annoyed at myself. I sure would appreciate any/all advice on
how to edit that file.

dave

As I understand it, Free Cell stats are stored in:

C:\Users\your user name\Appdata\Local\Microsoft Games\Freecell\Freecellsettings.xml

To edit it, all you need is notepad or any other text editor.
Then, find the appropriate entry and modify it, then save.


First, a Sincere Thank You, to the many responders. My question is FAR
less important than most other requests on this board.

Certainly I followed up on the various suggestions. I D/L'ed installed
the XML Notepad 2007, as well as another XML editor (Altova XMLSpy
2013) I found on the net. Neither xml editor allows acces to that
file. I have verified that the File Properties are not restricted from
editing. Both editors give me two, most similar error messages:

Sorry file c:\users\ ... \games \freecell \freecellsettings.xml
cannot be opened.

Can't load binary file c:\users\ ... \games \freecell
\freecellsettings.xml

Note: Above, I have truncated the the full file directory info. For
sure I did locate the applicable Frrecell file.

I sure would aprreciate further advice, as to how I can open and edit
that Freecell file, in an xml editor.

Thanks


Arrgh!

OK, I dug out the Windows 7 laptop, played a game of Freecell
(don't know how, quit and accepted a loss).

OK, brought the freecellsettings.xml back to my WinXP machine
for analysis.

Loaded it in a hex editor. It isn't an XML file that I can see. It
is a two part file, consisting of a binary PNG at the front,
followed by unicode text. Didn't anyone scroll to the end
of the file ? Unicode text in Windows, uses two bytes per character.

Snip the file, leaving hex 89 followed by the letters PNG.
That's the beginning of a PNG file.

This is what is contained in the PNG file I got as a result.
This is magnified by a factor of four, for those with poor eyesight.
It's actually 256x192. Now, why it was important to record this, I'll
never know.

http://imageshack.us/a/img541/4653/test3o.png

There is a PNG spec here, if anyone is interested.

http://www.w3.org/TR/PNG/

I left the text at the end of it (which is past the IEND segment
of the PNG), as it doesn't hurt anything. In other words, with a
hex editor, you snip until you find 137 80 78 71 13 10 26 10 decimal.
137 decimal is 89 hex. Capital P is 80 decimal. (search for "man ascii"
in Google.) So splat PNG, four characters, is the header of a PNG file.
Depending on your image editor, you don't need to precisely snip off
the end, to see the PNG. The image loader will ignore input past
the IEND thing.

We need to remove the PNG file, then analyse the rest of it. The rest
is in unicode. And Notepad should handle it. The end of the PNG is near
IEND, followed by four other characters.

OK, long story short, while keeping your eye on the IEND thing
(which is near the end of the PNG), look for

hex 0xFF, hex 0xFE, then unicode looking like .R.o.o.t.

You want to keep the 0xFF and 0xFE preamble. Snip everything before
that. Save that as test.xml say. Load in Wordpad. You will see

Root
Stats
Version0/Version
GamesPlayed1/GamesPlayed
GamesWon0/GamesWon
MaxWinStreakLength0/MaxWinStreakLength
MaxLoseStreakLength1/MaxLoseStreakLength
CurrStreakLength1/CurrStreakLength
WonlastGamefalse/WonlastGame
/Stats
Options
Version2/Version
PlaySoundstrue/PlaySounds
PlayAnimationstrue/PlayAnimations
RandomAppearancefalse/RandomAppearance
AutoLoadfalse/AutoLoad
TurnOffTipsfalse/TurnOffTips
AutoSaveGameOnExitfalse/AutoSaveGameOnExit
FirstPlayfalse/FirstPlay
CurrDeckSkin2/CurrDeckSkin
CurrBackground0/CurrBackground
/Options
/Root

This is actually unicode, so every character is represented by two bytes.

The only question that remains, is whether the garbage between the
end of the PNG IEND and the beginning of the 0xFF 0xFE unicode
preamble, is a checksum or not.

Hacking the rest of it, is left as a joyous exercise for the
reader.

So it's not "quantum cryptography", it's just obfuscation.
Cut the file in two, edit the text trailer, reassemble.
If it is protected by a checksum, there are some bytes between
IENDxxxx and 0xFF 0xFE that I cannot account for. Make a backup
of the file, before loading your hacked one.

At the very end of the file, I see 0x00 0x0a 0x00 0x00 0x00,
and you probably can't create that with a text editor. When
reassembling the file and bolting it back together, check
that the postamble is correct. I don't know why there is a
Unicode zero down there. A text editor shows that character
as a square. If saving out the file happens to remove it,
you can put that back with the hex editor.

Have fun,

Paul
  #19  
Old May 15th 13, 07:56 PM posted to alt.windows7.general
Gene E. Bloch[_2_]
external usenet poster
 
Posts: 7,485
Default How to Edit an xml file

On Wed, 15 May 2013 12:13:03 -0400, Paul wrote:

At the very end of the file, I see 0x00 0x0a 0x00 0x00 0x00,
and you probably can't create that with a text editor. When
reassembling the file and bolting it back together, check
that the postamble is correct. I don't know why there is a
Unicode zero down there. A text editor shows that character
as a square. If saving out the file happens to remove it,
you can put that back with the hex editor.


I use this hex editor:

http://mh-nexus.de/en/

And that was pretty good detective work, Paul!

--
Gene E. Bloch (Stumbling Bloch)
  #20  
Old May 18th 13, 02:34 AM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default How to Edit an xml file

On Wed, 15 May 2013 11:56:50 -0700, "Gene E. Bloch"
wrote:

On Wed, 15 May 2013 12:13:03 -0400, Paul wrote:

At the very end of the file, I see 0x00 0x0a 0x00 0x00 0x00,
and you probably can't create that with a text editor. When
reassembling the file and bolting it back together, check
that the postamble is correct. I don't know why there is a
Unicode zero down there. A text editor shows that character
as a square. If saving out the file happens to remove it,
you can put that back with the hex editor.


I use this hex editor:

http://mh-nexus.de/en/

And that was pretty good detective work, Paul!


Ahem, didn't we collectively discuss this very same topic a few months ago
in this group? I clearly remember pointing out that the actual xml resides
at the end of the file. Oh well, I guess if it's worth discovering, it's
worth discovering again. ;-)

--

Char Jackson
  #21  
Old May 18th 13, 02:34 AM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default How to Edit an xml file

On Tue, 14 May 2013 11:07:43 -0700, "Gene E. Bloch"
wrote:

On Tue, 14 May 2013 12:58:21 -0400, SC Tom wrote:

"The input is not a valid Base-64 string as it contains a non-base 64
character, more than two padding characters, or a non-white space character
among the padding characters."

Maybe that's not it :-)


OK, try ROT13 next.

:-)


Sometimes, when I need extra super security, I use *DOUBLE* ROT13! The
average person never even notices.

--

Char Jackson
  #22  
Old May 18th 13, 11:54 PM posted to alt.windows7.general
Gene E. Bloch[_2_]
external usenet poster
 
Posts: 7,485
Default How to Edit an xml file

On Fri, 17 May 2013 20:34:46 -0500, Char Jackson wrote:

On Wed, 15 May 2013 11:56:50 -0700, "Gene E. Bloch"
wrote:

On Wed, 15 May 2013 12:13:03 -0400, Paul wrote:

At the very end of the file, I see 0x00 0x0a 0x00 0x00 0x00,
and you probably can't create that with a text editor. When
reassembling the file and bolting it back together, check
that the postamble is correct. I don't know why there is a
Unicode zero down there. A text editor shows that character
as a square. If saving out the file happens to remove it,
you can put that back with the hex editor.


I use this hex editor:

http://mh-nexus.de/en/

And that was pretty good detective work, Paul!


Ahem, didn't we collectively discuss this very same topic a few months ago
in this group? I clearly remember pointing out that the actual xml resides
at the end of the file. Oh well, I guess if it's worth discovering, it's
worth discovering again. ;-)


I don't recall the earlier discussion, but I have to agree with your
last remark anyway.

Now if only my friends would agree that a story worth telling once is
worth telling twice...or thrice...or...

--
Gene E. Bloch (Stumbling Bloch)
  #23  
Old May 18th 13, 11:56 PM posted to alt.windows7.general
Gene E. Bloch[_2_]
external usenet poster
 
Posts: 7,485
Default How to Edit an xml file

On Fri, 17 May 2013 20:34:46 -0500, Char Jackson wrote:

On Tue, 14 May 2013 11:07:43 -0700, "Gene E. Bloch"
wrote:

On Tue, 14 May 2013 12:58:21 -0400, SC Tom wrote:

"The input is not a valid Base-64 string as it contains a non-base 64
character, more than two padding characters, or a non-white space character
among the padding characters."

Maybe that's not it :-)


OK, try ROT13 next.

:-)


Sometimes, when I need extra super security, I use *DOUBLE* ROT13! The
average person never even notices.


A while back there was someone on some newsgroup (I forget who & which)
whose sig file was "Contents protected by double ROT13". I loved it...

But of course, I happen to have the app to decrypt it.

--
Gene E. Bloch (Stumbling Bloch)
  #24  
Old May 19th 13, 11:58 AM posted to alt.windows7.general
mechanic
external usenet poster
 
Posts: 1,064
Default How to Edit an xml file

On Sat, 18 May 2013 15:56:57 -0700, Gene E. Bloch wrote:

A while back there was someone on some newsgroup (I forget who &
which) whose sig file was "Contents protected by double ROT13". I
loved it..


Isn't that a simple rotation still? Part of a 'ring' of operations
or somesuch (rusty algebra). No serious crypto at all.
  #25  
Old May 19th 13, 01:20 PM posted to alt.windows7.general
John Williamson
external usenet poster
 
Posts: 434
Default How to Edit an xml file

mechanic wrote:
On Sat, 18 May 2013 15:56:57 -0700, Gene E. Bloch wrote:

A while back there was someone on some newsgroup (I forget who &
which) whose sig file was "Contents protected by double ROT13". I
loved it..


Isn't that a simple rotation still? Part of a 'ring' of operations
or somesuch (rusty algebra). No serious crypto at all.


Saying you've used "Double ROT13" or "I ROT13ed it twice" is a joke?

ROTting twice just outputs the plaintext.

FYI, ROT13 isn't intended as crypto except for things like plot spoilers.

--
Tciao for Now!

John.
  #26  
Old May 19th 13, 04:05 PM posted to alt.windows7.general
Ken Blake[_4_]
external usenet poster
 
Posts: 3,318
Default How to Edit an xml file

On Sun, 19 May 2013 11:58:05 +0100, mechanic
wrote:

On Sat, 18 May 2013 15:56:57 -0700, Gene E. Bloch wrote:

A while back there was someone on some newsgroup (I forget who &
which) whose sig file was "Contents protected by double ROT13". I
loved it..


Isn't that a simple rotation still? Part of a 'ring' of operations
or somesuch (rusty algebra). No serious crypto at all.



I'm afraid that you missed his joke. Double ROT13 returns the text to
what it started with, so there is no change and no protection at all.
g
  #27  
Old May 19th 13, 08:27 PM posted to alt.windows7.general
mechanic
external usenet poster
 
Posts: 1,064
Default How to Edit an xml file

On Sun, 19 May 2013 08:05:49 -0700, Ken Blake wrote:

On Sun, 19 May 2013 11:58:05 +0100, mechanic
wrote:

On Sat, 18 May 2013 15:56:57 -0700, Gene E. Bloch wrote:

A while back there was someone on some newsgroup (I forget who &
which) whose sig file was "Contents protected by double ROT13". I
loved it..


Isn't that a simple rotation still? Part of a 'ring' of operations
or somesuch (rusty algebra). No serious crypto at all.


I'm afraid that you missed his joke. Double ROT13 returns the text to
what it started with, so there is no change and no protection at all.
g


Ooops - I was thinking of the general case and forgot the specifics
of ROT13.
  #28  
Old May 19th 13, 10:53 PM posted to alt.windows7.general
Gene E. Bloch[_2_]
external usenet poster
 
Posts: 7,485
Default How to Edit an xml file

On Sun, 19 May 2013 20:27:21 +0100, mechanic wrote:

On Sun, 19 May 2013 08:05:49 -0700, Ken Blake wrote:

On Sun, 19 May 2013 11:58:05 +0100, mechanic
wrote:

On Sat, 18 May 2013 15:56:57 -0700, Gene E. Bloch wrote:

A while back there was someone on some newsgroup (I forget who &
which) whose sig file was "Contents protected by double ROT13". I
loved it..

Isn't that a simple rotation still? Part of a 'ring' of operations
or somesuch (rusty algebra). No serious crypto at all.


I'm afraid that you missed his joke. Double ROT13 returns the text to
what it started with, so there is no change and no protection at all.
g


Ooops - I was thinking of the general case and forgot the specifics
of ROT13.


Well, if you don't mind too much, we had a bit of fun with your
response.

And as you well know, every one of us has done worse somewhere along the
line :-)

--
Gene E. Bloch (Stumbling Bloch)
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 02:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.