.xml viewing on monteray 📄

Hello all,


For work, in need to view .xml files. I've looked into this for Mac OS with the general advice being to download apps like MacVIM or TextMate. I've tried these and they simply display a page which starts like:


<?xml version='1.0' encoding='UTF-8'?><GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope"><EnvelopeVersion>2.0</EnvelopeVersion><Header><MessageDetails><Class>HMRC-PAYE-RTI-EPS</Class><Qualifier>response</Qualifier><Function>submit</Function><TransactionID></TransactionID><CorrelationID>DB90C0A5AC994032B3063F1838CB4DD3</CorrelationID><ResponseEndPoint


Even opening the .xml in Chrome results in the same.


What's going wrong?


Many thanks 🙏

iMac 24″, macOS 12.5

Posted on Aug 21, 2022 9:46 PM

Reply
10 replies

Aug 22, 2022 1:37 AM in response to modene1

You don’t seem to understand that xml is not just one type of document. It is an eXtensible Markup Language, of which there are thousands of variants. Each application can have its own specific requirements and define its own version.

Each XML file contains text, similar to what you posted. That is why a human can almost read it - but it is meant more for the ability to transfer information across, in textual, rather than binary format.

For example, Final Cut Pro has irs own version (actually, versions, as new features of the application in turn require new xml tags or format). Some applications like DaVinci Resolve can read that, but others can’t (like Premiere Pro). The support for some variantof XML has to be programmed into an application.


In summary, there is not just one XML, and there is no way a single application could just about display any such documents.

Aug 22, 2022 8:20 AM in response to modene1

MacVim, TextMate, and Chrome are all 3rd party apps. If you have questions about how they display an XML document, you will have to ask their developers.


What you have posted looks like a portion of an XML document. There are more sophisticated tools that will render such documents in a "tree" layout like this:


GovTalkMessage

> EnvelopeVersion = 2.0

> Header

> MessageDetails

> Class = HMRC-PAYE-RTI-EPS

> Qualifier = response

> Function = submit

> TransactionID = <null>

> CorrelationID = DB90C0A5AC994032B3063F1838CB4DD3

> ResponseEndPoint...


But beyond that, this is all that XML is. There is no way to automatically turn any XML document into any kind of "beautiful" document. One could use the XSL language to create an XSL stylesheet (just another XML document) that could transform this XML document into HTML, Text, rich text, etc. But you would have to either find and download such an XSL stylesheet or create one with really, really in-depth knowledge about all the technologies involved as well as this particular XML document type. Usually, if any such transformation exists, it would be included in the XML document itself and modern web browsers would be able to automatically detect that stylesheet and display it as you expect. From what you posted, this document does not appear to include that information.

Aug 22, 2022 7:33 AM in response to modene1

modene1 wrote:

Thanks for taking the time for such a full response.

Clearly I'm not an IT person. This comes from an accounting s/w product called Xero and it's tied into the UK Gov tax service. Can't fathom why either of them would produce something so unreadable.

It's supposed to be a confirmation of having processed a tax document.

Bizzare

XML is markup language. It is a set of codes, or tags, that describes the text in a digital document.

The most famous markup language is hypertext markup language (HTML), which is used to format Web pages. XML contains metadata. It is machine readable.

You say that for work you need to read XML files. What do you need to read them for? They contain metadata. They describe how data should appear.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

.xml viewing on monteray 📄

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.