# xml files on a mac



## glamrockchick (Dec 25, 2011)

text edit opens it but it is all jumbled up and i can't read it properly.. any tips so it can be more readable? its a conversation


----------



## DeltaMac (Dec 25, 2011)

What application created that file?
If you don't know for sure - where did you get the file?

If you downloaded the file from another internet site, are there any recommendations on that site for viewing the file?


----------



## glamrockchick (Dec 25, 2011)

got it from an msn conversation i want to keep from my log files and was a xml format.. on windows


----------



## DeltaMac (Dec 25, 2011)

Can MS Word open that file properly?

Windows? on your Mac? or from a Windows PC?
Can you open it in Windows, with notepad?


----------



## MisterMe (Dec 25, 2011)

glamrockchick said:


> text edit opens it but it is all jumbled up and i can't read it properly.. any tips so it can be more readable? its a conversation


It is unclear what you mean by "jumbled up," but XML files are plain text and should open without issue in *Text Edit*, any other text editor, or *Xcode*. My guess is that the file looks jumbled because you don't recognize standard XML tags in your files. Make sure that your document windows are wide enough so that no source line has to break across two lines. If you have a minimal level of understanding of computer code, then the text may look more familiar.


----------



## BjarneDM (Dec 26, 2011)

@glamrockbitch:
You've still got a serious problem with stating your problems comprehensively.
When you state a problem, please give as much information as you can:

the programs you are using
where you've got the file from
what are the problems with the file - give an example
what have you tried that worked, didn't work
If you don't state as much information as you have up front you'll seriously risk that people in here won't answer you questions as it way too much work to get a proper understanding of your problems. We'ld rather have more information than needed than less - as you are doing.

Also : give feedback

did the solutions work for you
what was helpful and what not
thanking people for their help is very much appreciated
give some indication that you've read the answers and whether you'll try any of the suggestions - eg I'm awating feedback on my previous help to you.
If you don't give feedback - people will stop helping you.


----------



## artov (Dec 26, 2011)

I have used Internet Explorer (on Vista running on VMWare Fusion) to view XML files. According to Apple's What&#8217;s New in Safari 5.1, Safari also helps one viewing XML-files.


----------



## glamrockchick (Dec 26, 2011)

nope doesn't seem to open on word and yep was from windows and i transferred it onto my mac because having problems with windows pc.. jumbled up as in: in text edit it comes out like this: <?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='MessageLog.xsl'?>
<Log FirstSessionID="1" LastSessionID="4"><Message Date="10/09/2011" Time="18:19:08" DateTime="2011-09-10T17:19:08.999Z" SessionID="1"><From><User FriendlyName="Martin"/></From><To><User FriendlyName="PrInCeSs DoRiT-SaMaNtHa "/></To><Text Style="font-family:Segoe UI; color:#ff00ff; ">have u sent any txts today? none thru yrt</Text></Message><Message Date="10/09/2011" Time="18:19:29" DateTime="2011-09-10T17:19:29.319Z" SessionID="1"><From><User FriendlyName="PrInCeSs DoRiT-SaMaNtHa "/></From><To><User FriendlyName="Martin"/></To><Text Style="font-family:Segoe UI; color:#000000; ">im an 


hardly readable like that.. tried to open it with all the things i could think of ..


----------



## midijeep (Dec 26, 2011)

Here's my experience with trying to do something with .xml extension, though it may be a short experience, I wasted a lot of hours  trying  to use an exported .xml file format from one application and importing it into another.  The .xml file is a raw data file and just that.  A careful choice of a receiving application to import the .xml will  import the raw data .xml file format but doesn't know how to put the raw data into nice tables and graphs.  Usually a "in between application"  needs to to that for you with a need to ask a programmer to help you with the finioshed product.  Also,  Microsoft basically abandoned the .xml several years ago and is becoming less supported in both Mac and Windows worlds.  I would try to stay away from the .xml file format.


----------



## glamrockchick (Dec 26, 2011)

ok will try to in the future but really wanna read this file , so is there anything i can do? its such an annoying format


----------



## Satcomer (Dec 26, 2011)

I use LibreOffice (which is free). So try that to see if it works for you.


----------



## glamrockchick (Dec 26, 2011)

thanks  so file should be clear to read and i open the file with this program?


----------



## glamrockchick (Dec 26, 2011)

damn get an error  says: general error, general input / output error


----------



## BjarneDM (Dec 26, 2011)

M$ has a long history of embrace - extend - own in their relationship with the standards. So too with XML. Eg. in IE6 M$ introduced support for IE6 to be able to handle raw XML files. But they implemented a draft version of the XML standard and never updated it to the final version, thus leading to severe compatibility problems between the browsers, as everybody else implemented the final version of the XML standard.

I'm guessing, that M$ has implemented some bastard version of XML in MSN. Most programs will expect the input to follow the standard & can't handle bastard versions.

The only program, I can think of, that might be able to handle M$ XML, is BBEdit. You can download a trial version from barebones. Under 
menu::Markup -> Tidy
menu::Markup -> Utilities -> Format ...
you've got several options you can experiment with. You can always undo and return to the original, if an experiment doesn't give you a good result.

When you've got a proper reflow of the document, you might want to use some search & replace commands to compact the document to bring several lines together.


----------



## MisterMe (Dec 26, 2011)

midijeep said:


> Here's my experience with trying to do something with .xml extension, though it may be a short experience, I wasted a lot of hours  trying  to use an exported .xml file format from one application and importing it into another.  The .xml file is a raw data file and just that.  A careful choice of a receiving application to import the .xml will  import the raw data .xml file format but doesn't know how to put the raw data into nice tables and graphs.  Usually a "in between application"  needs to to that for you with a need to ask a programmer to help you with the finioshed product.  Also,  Microsoft basically abandoned the .xml several years ago and is becoming less supported in both Mac and Windows worlds.  I would try to stay away from the .xml file format.


No, XML is the exact opposite of raw data. Data and the script to display it can be embedded within an XML file.



glamrockchick said:


> nope doesn't seem to open on word and yep was from windows and i transferred it onto my mac because having problems with windows pc.. jumbled up as in: in text edit it comes out like this: <?xml version="1.0"?>
> <?xml-stylesheet type='text/xsl' href='MessageLog.xsl'?>
> <Log FirstSessionID="1" LastSessionID="4"><Message Date="10/09/2011" Time="18:19:08" DateTime="2011-09-10T17:19:08.999Z" SessionID="1"><From><User FriendlyName="Martin"/></From><To><User FriendlyName="PrInCeSs DoRiT-SaMaNtHa "/></To><Text Style="font-family:Segoe UI; color:#ff00ff; ">have u sent any txts today? none thru yrt</Text></Message><Message Date="10/09/2011" Time="18:19:29" DateTime="2011-09-10T17:19:29.319Z" SessionID="1"><From><User FriendlyName="PrInCeSs DoRiT-SaMaNtHa "/></From><To><User FriendlyName="Martin"/></To><Text Style="font-family:Segoe UI; color:#000000; ">im an
> 
> ...


As described in my earlier post and as explicitly stated by *BjarneDM*, this appears to be a text flow issue. XML is a markup language. It looks very much like HTML. Based on the snippet of code that you posted, there is no evidence that there is anything wrong with your XML file. It appears that you are trying to flow the text of the file into a narrow application window. I do not see any Microsoft issues in your posted snippet.

I assume that your MSN conversation was not confidential because it was an Internet chat in the open. If you attach the XML file or post the complete text, then many members of this forum can strip the XML code leaving the transcript of the conversations that you want to preserve. Having people tell you how bad Microsoft is may true but will not solve your problem.


----------



## midijeep (Dec 26, 2011)

MisterMe said:


> No, XML is the exact opposite of raw data. Data and the script to display it can be embedded within an XML file.



xml is raw data. By your comment - "Data and the script to display it can be embedded within an XML file" and thus the raw data needs processed.
 It is raw data to APIs.  If something needs processed, by definition it is given in a raw form as I stated.  As you stated the data needs to be embedded, again from a raw form.


----------



## BjarneDM (Dec 26, 2011)

I agree with *midijeep* - XML is raw data.

The purpose of XML, HTML and SGML is to function as meta-formats that describe the data. You''ll always want to do something with this data on the receiving end. All of these formats are in clear-text and thus human-readable. You can actually print it out, send it by snail-mail, and then type it in on the receiving end.

Now, in OOXML M$ bastardized this principle by allowing pure binary data in a proprietary format to be embedded in the format. Actually, Apple in some of their .plist files also embeds binary data, but Apple encodes the data in BASE64 thus following the rules.

As to the formatting problem: formatting - that's only to make it more human-readable. White-space present between an end-tag and a start-tag is by definition ignored by the interpreters, so having the whole of the XML data as one long string of text without any line-breaks is actually completely OK !

I've had practical experience with HTML, CSS, Ajax, XML & XSLT in one of my web-project where an XMLHTTPRequest from the browser resulted in data from a MySQL database being transformed into XML which was sent back to the browser. In the browser, an XSLT-stylesheet was applied to the raw XML transforming it into HTML. The HTML was then inserted into the web-page and CSS applied to it.

The characteristics of XML are:

it's a data exchange format
it's in clear text
it's human readable
it fills way more than binary data
One of the best book I've read about XML is Learning XML, 2nd Edition

SVG is actually an XML-dialect.


----------



## MisterMe (Dec 26, 2011)

BjarneDM said:


> I agree with *midijeep* - XML is raw data.
> 
> The purpose of XML, HTML and SGML is to function as meta-formats that describe the data. ...


You contradict yourself. Raw data are raw. No additional formatting other than formatting from the source. No added metaformats. No added mark-up tags. No additional processing. No scripts to perform processing. No added descriptions. No added anything.


----------



## BjarneDM (Dec 26, 2011)

hmmmm ... I stand corrected 

raw data
structured data

Professional XML Meta Data
Thinking XML: Learning Objects Metadata
XML Technologies And Its Application in Metadata Management System


----------



## glamrockchick (Dec 27, 2011)

is BBEdit easy to use and think it will solve it? some of my conversation is private so wouldn't wanna post the whole file


----------



## BjarneDM (Dec 27, 2011)

BBEdit is quite a complicated beast with a lot of functionality, but it's the only program I'm aware of that's able to reflow a document with XML data. Even having used it since Mac OS 8 was all the rage, I still haven't used every option available.

Do download it and try i out. You'll have to experiment with the options to get the best result.


----------



## artov (Dec 27, 2011)

glamrockchick said:


> nope doesn't seem to open on word and yep was from windows and i transferred it onto my mac because having problems with windows pc.. jumbled up as in: in text edit it comes out like this: <?xml version="1.0"?>
> <?xml-stylesheet type='text/xsl' href='MessageLog.xsl'?>
> <Log FirstSessionID="1"..



*?xml-stylesheet* means that the file is meant to be processed by the MessageLog.xsl file. Do you have it? If so, try to run it with xsltproc -command (on Terminal.app); like:

[COD]xsltproc MessageLog.xsl the.xml[/CODE]

I bet the result is much more readable.

XSL file is actually a script (itself also XML) that reads XML-file and outputs something else; normally another XML-file, but it could also be HTML-file or even a text file.


----------



## glamrockchick (Dec 27, 2011)

downloaded the program, and did auto detect for the font and still the same. what options could  i try?


----------



## BjarneDM (Dec 29, 2011)

What do you really expect to get as the result ?

If you've only got the XML file from the msn chat you'll not be able to re-create the look from messenger.

Only having the XML file means you'll only be able to re-format the XML file to make it more humanly readable.

In order to fully re-create the look-and-feel from messenger, you'll also need at least

an XSLT stylesheet
a CSS file
It could be a fun project to do, but then I'ld need access to a msn XML file - not necessarily the one with your private chat - just a complete conversation of some kind.

For re-formatting the XML file to something more humanly readable, you've already gotten the instructions for how to do it in BBEdit.


----------



## glamrockchick (Dec 29, 2011)

yep wasn't sure on the options for BBedit of what to press .. ahh so is it too complicated to get it back to how it was originally? don't have another msn chat of that format, thats the only one i had.. could maybe send a bit of that one


----------



## BjarneDM (Dec 29, 2011)

It's not too complicated - just very complicated 

And a part of a chat isn't good enough - I'ld need to have a complete chat to work with for completely technical reasons.

I've attached an example of an XSL to give you an example of what I'ld have to create.


----------



## glamrockchick (Dec 29, 2011)

oh thats not good, I'm not good with things too complicated.. guess gonna have to leave it then.thanks anyway  so if i was on another windows pc would it work or be the same as on here? i have a netbook with windows 7


----------



## BjarneDM (Dec 29, 2011)

I'm not that at all well versed with Windows.

But if you can copy the file into the chat log, Messenger might be able to pick it up when started again.

But we've got Messenger and a program called Adium. The same here - if you can put the file into the chat log these programs might be able to pick it up and display it correctly.

I've no experience at all with any of these programs, so you'll have to get further help with these from other people.


----------



## glamrockchick (Dec 29, 2011)

ahh to paste it as if i was sending it to someone on msn?


----------



## BjarneDM (Dec 29, 2011)

nope ... I guess you found the original XML-file somewhere in the filesystem on the WinTel machine. You'll have to find out where the chat log is stored in the filesystem and add it to that folder.

Again - I don't know how or where any of these programs store their chat logs.


----------



## glamrockchick (Dec 29, 2011)

can't get windows pc on where its located and yep was located in my received files and then my msn address


----------



## DeltaMac (Dec 29, 2011)

Ah, OK ??
Can it be possible to make your post more confusing?

Is there a problem with power on the PC (won't turn on), or can't get to the computer's location (Is it located somewhere else?)
What is a 'yep?' - I think you mean 'yes', but I might be taking that out of context?


----------



## glamrockchick (Dec 29, 2011)

sorry for not making myself clear-- pc won't turn on- modem comes on with light but nothing on the actual screen itself..


----------



## DeltaMac (Dec 29, 2011)

Probably a power supply in the PC.


----------



## glamrockchick (Dec 30, 2011)

someone else said it might be that to, can it easily be fixed? i suffered with blue screen issue too, one day wouldn't turn back on, did last week for a couple of days which  was freaky and not again


----------

