Welcome to IWETHEY!
Post #275,495
12/11/06 4:32:43 PM
12/12/06 9:13:09 PM
|
Well, in Squeak it would look something like
\ndoc := XMLDOMParser parseDocumentFrom: (FileDirectory current fileNamed: 'file.xml').\ndoc tagsNamed: 'attr' do:\n[:each |\n each contentsDo:\n [:t | t isText ifTrue: [t string: (((t string asLowercase split: '_') collect: [:s | s capitalized]) join: '_') ]]\n].\n(FileDirectory current forceNewFileNamed: 'file.xml') nextPutAll: (doc asString); close.\n Edit: fixed formatting
[link|http://www.blackbagops.net|Black Bag Operations Log]
[link|http://www.objectiveclips.com|Artificial Intelligence]
[link|http://www.badpage.info/seaside/html|Scrutinizer]
|
Help! How to programatically edit case of strings?
- (
CRConrad)
- (24)
- Dec. 11, 2006, 10:26:37 AM EST
Problem restated
- (
crazy)
- (3)
- Dec. 11, 2006, 10:38:29 AM EST
Particular - SOME tag, not any other tag.
- (
CRConrad)
- (2)
- Dec. 11, 2006, 03:53:22 PM EST
The ultimate clueless non-programmer wannabe approach
- (
crazy)
- (1)
- Dec. 11, 2006, 04:29:50 PM EST
Thanks a lot... (new thread)
- (
CRConrad)
- Dec. 12, 2006, 08:25:36 AM EST
Well, in Squeak it would look something like
- (
tuberculosis)
- Dec. 12, 2006, 09:13:09 PM EST
UltraEdit will do it.
- (
Another Scott)
- Dec. 11, 2006, 04:42:57 PM EST
at risk of a war, do this
- (
boxley)
- (16)
- Dec. 11, 2006, 04:57:24 PM EST
alt-C, bay-bee.
- (
admin)
- Dec. 11, 2006, 06:09:09 PM EST
Go ahead
- (
crazy)
- (14)
- Dec. 11, 2006, 06:48:22 PM EST
get vi'ed :-) I dont use that shite
-NT
- (
boxley)
- Dec. 11, 2006, 07:37:23 PM EST
Who the fsck writes LISP to use Emacs?
-NT
- (
admin)
- (12)
- Dec. 11, 2006, 09:02:37 PM EST
Ok, fine.
- (
crazy)
- (11)
- Dec. 11, 2006, 09:21:40 PM EST
I need more of the problem specifics
- (
admin)
- (9)
- Dec. 12, 2006, 12:16:44 AM EST
Hope it's a single file
- (
crazy)
- (8)
- Dec. 12, 2006, 06:54:49 AM EST
As always, use the right tool for the job.
- (
admin)
- (7)
- Dec. 12, 2006, 10:21:34 AM EST
Bunch of text mungers
- (
tuberculosis)
- (6)
- Dec. 12, 2006, 01:47:49 PM EST
Er, come again?
- (
admin)
- (4)
- Dec. 12, 2006, 02:25:35 PM EST
thats our todd, no point manipulating some text
- (
boxley)
- (1)
- Dec. 12, 2006, 06:26:07 PM EST
Probably smaller than emacs, though :-P
-NT
- (
admin)
- Dec. 12, 2006, 10:18:52 PM EST
Eh? I did it in 3 lines.
- (
tuberculosis)
- (1)
- Dec. 12, 2006, 09:15:23 PM EST
Re: Eh? I did it in 3 lines.
- (
admin)
- Dec. 12, 2006, 11:12:08 PM EST
emacs is xml?
-NT
- (
boxley)
- Dec. 12, 2006, 06:24:36 PM EST
Re: Ok, fine.
- (
admin)
- Dec. 12, 2006, 12:24:14 AM EST
Thanks, Scotts.
- (
CRConrad)
- Dec. 12, 2006, 08:38:28 AM EST
Remember, people in 1900 didn't know what an atom was. They didn't know its structure.
They also didn't know what a radio was, or an airport, or a movie, or a television, or a computer, or a cell phone, or a jet, an antibiotic, a rocket, a satellite, an MRI, ICU, IUD, IBM, IRA, ERA, EEG, EPA, IRS, DOD, PCP, HTML, internet. interferon, instant replay, remote sensing, remote control, speed dialing, gene therapy, gene splicing, genes, spot welding, heat-seeking, bipolar, prozac, leotards, lap dancing, email, tape recorder, CDs, airbags, plastic explosive, plastic, robots, cars, liposuction, transduction, superconduction, dish antennas, step aerobics, smoothies, twelve-step, ultrasound, nylon, rayon, teflon, fiber optics, carpal tunnel, laser surgery, laparoscopy, corneal transplant, kidney transplant, AIDS... None of this would have meant anything to a person in the year 1900. They wouldn't know what you are talking about.
49 ms