How to make Oxygen treat a txt file as XML (no import) ?

Questions about XML that are not covered by the other forums should go here.
lkuty
Posts: 2
Joined: Sun Aug 14, 2011 8:55 am

How to make Oxygen treat a txt file as XML (no import) ?

Post by lkuty »

Hello,

If I load a file with extension txt in Oxygen 11, Oxygen treat it as a text file. But in fact the content of the file is XML. How could I tell Oxygen to consider it as XML and be able to have syntax highlighting and other things related to XML ?

The file is loaded through the pipe mechanism under Mac OS X and the command open:

Code: Select all


gzcat B000QUU7KC.xml.gz | open -f -a Oxygen
The command line launcher oxygenMac.sh doesn't seem to have the required options:

Code: Select all


mac:oxygen ludo$ oxygenMac.sh --help

Usage:
oxygenMac.sh --help : to show this help
oxygenMac.sh --h : to show this help
oxygenMac.sh [pathToFile]... : to open the specified files
oxygenMac.sh -instance pathToXMLFile -schema pathToSchemaFile -schemaType XML_SCHEMA|DTD_SCHEMA|RNG_SCHEMA|RNC_SCHEMA -dtName documentTypeName: to open a file with default schema association
TIA,

Ludovic Kuty
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: How to make Oxygen treat a txt file as XML (no import) ?

Post by Dan »

You can change the internal oXygen file association for the "txt" files. For this:
  • Open the Options/Preferences dialog
  • Go to "File Types"
  • Select the "txt" entry and press "Edit"
  • Change the default editor to "XML Editor"
Regards,
Dan
lkuty
Posts: 2
Joined: Sun Aug 14, 2011 8:55 am

Re: How to make Oxygen treat a txt file as XML (no import) ?

Post by lkuty »

Thanks, that worked as expected :D
Post Reply