LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-12-2011, 07:40 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Are TABS replaceble by spaces in an xml file?


Kernel 2.6.21.5, slack 12.0

Hi:
I have a file beginning with <?xml version=1.0?>. May I replace tabs by spaces in it? Thanks.
 
Old 06-12-2011, 08:45 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
That depends on the XML content.

If the schema controlling the file indicates that you have mixed content, then it depends upon how the content is interpreted.

It's about the same as asking if you can replace tabs by spaces in a given random text file.

If it's an XML file that doesn't have mixed content, then you probably can replace tabs with spaces. I can't think of a sane reason for the whitespace between the elements in those types of files to be important.
 
Old 06-12-2011, 08:57 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Well, the file is ~/.mozilla/firefox/u88mwxdz.default/mimeTypes.rdf. It sets associations between such things as MIME types and handlers of files of these types.

It is read by Firefox each time it starts. Do you think there can be mixed content in it? (I skimmed through your link).

Thanks for your kind reply.

Last edited by stf92; 06-12-2011 at 08:59 AM.
 
Old 06-12-2011, 09:10 AM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
It doesn't.

See http://www.w3.org/TR/1998/WD-rdf-schema-19980409/
 
Old 06-12-2011, 09:28 AM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Drafts are a great thing, aren't they. But knowing where to look for is another story, I guess. I've got your very valuable negative answer and, as a premium, the draft. Thanks a lot, Richard Cranium.
 
Old 06-12-2011, 10:28 AM   #6
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
As said, XML in itself, it doesn't matter, but depending on what the XML is used for, it MAY matter... Say if the XML holds some Haskell (ie) source snippet then you shouldn't, like for any content that rely on tab for whatever... As usual: do a backup and try...

Last edited by NoStressHQ; 06-12-2011 at 10:30 AM.
 
Old 06-12-2011, 11:50 AM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Alluded.
 
  


Reply



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

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retain Multiple spaces and tabs in a file by c-sh file operation infosrig Linux - Software 3 02-22-2011 03:08 AM
Grep ignoring spaces or tabs ohijames Programming 6 06-29-2010 02:52 PM
Spaces vs. Tabs, and a specific question about space indenting. golmschenk Programming 24 02-28-2010 08:10 AM
Geany - How do you convert tabs to spaces? golmschenk Linux - Software 6 02-27-2010 04:06 PM
Replacing Tabs (^T) with spaces.... visitnag Linux - Newbie 3 05-04-2008 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration