This forum is in permanent archive mode. Our new active community can be found here.

Newbie XML question

edited November 2007 in Technology
Pardon a simple question... but I've never dealt with XML before.

I have a problem. I am trying to edit an XML file that came with a GPS unit that I own. I can access the file fine, and all I need to do is change a few numbers within the file. (Gives better routings, ETAs, etc.)

So from a complete newb... how do I do this? A search on google suggests that it's not as simple as opening up the file in Notepad and making the changes.

Is there any way to do this without having to install a specialized XML editor?

Thanks!

Comments

  • XML is just plain text. Unless they did something funny to it, you should just be able to open it in Notepad, or VIM, or whatever you use.
  • Yes, to edit an XML file all you need is a text editor.
  • Tried it and it worked.

    Thanks!
  • edited August 2011
    I also have a newbie XML question:

    Here is shortened version of my XML file.

    This may seem like a very simple question, but how do I best display this as an html file?
    Post edited by Werther on
  • This may seem like a very simple question, but how do I best display this as an html file?
    The word you are looking for is XSLT.
  • permalinkquote
    Figured it out, thanks.
  • People_who_do_not_use_preview_or_edit_buttons_or_are_just_too_stupid_to_realize_something_is_off.jpg
  • People_who_do_not_use_preview_or_edit_buttons_or_are_just_too_stupid_to_realize_something_is_off.jpg
    My preview looked fine, my post looked stupid. I couldn't be bothered to see what's wrong.

    Person_who_has_shit_to_do.jpg
  • Person_who_has_shit_to_do.jpg
    Enough shit to do that you can respond in a timely manner.
  • Person_who_has_shit_to_do.jpg
    Enough shit to do that you can respond in a timely manner.
    I guess ~35 minutes is timely.
  • Person_who_has_shit_to_do.jpg
    Enough shit to do that you can respond in a timely manner.
    When I have finished working I have time, yes...

    Is there an easy way in Vi to search for spaces? My problem is that all my XMLs are exported with extra spaces, e.g. bla bla . This causes an error in the XSLT file, so I've been having to manually remove each of these spaces, i.e.
    bla bla.
  • Person_who_has_shit_to_do.jpg
    Enough shit to do that you can respond in a timely manner.
    When I have finished working I have time, yes...

    Is there an easy way in Vi to search for spaces? My problem is that all my XMLs are exported with extra spaces, e.g. bla bla . This causes an error in the XSLT file, so I've been having to manually remove each of these spaces, i.e.
    bla bla.
    Learn regular expressions. You can probably do this with less \, but I put extra in when I'm not sure. This will replace every instance of a whitespace character (also includes tabs and such) followed by a close column tag with just a close column tag.

    :%s/\\s\\<\\/column\>/\\<\\/column\\>/g
  • This will replace every instance of a whitespace character (also includes tabs and such) followed by a close column tag with just a close column tag.

    :%s/\\s\\<\\/column\>/\\<\\/column\\>/g
    This is really helpful, thanks again! I have been wanting to use Vi for a long time, the only thing stopping me is that I can't get Vi and Latex to play nice in OSX.
  • edited August 2011
    I can't get Vi and Latex to play nice in OSX.
    I think my brain just exploded.

    What? What does that even mean? What has OSX got to do with it? In what ways can vi and LaTeX play poorly together? *brains leaking out nose and ears*
    Post edited by Byron on
  • I can't get Vi and Latex to play nice in OSX.
    I think my brain just exploded.

    What? What does that even mean? What has OSX got to do with it? How does vi and Latex play poorly together? *brains leaking out nose and ears*
    Sorry for my probably very stupid statement. I can't get vim-latex to work on my mac.
  • I can't get Vi and Latex to play nice in OSX.
    I think my brain just exploded.

    What? What does that even mean? What has OSX got to do with it? How does vi and Latex play poorly together? *brains leaking out nose and ears*
    Sorry for my probably very stupid statement. I can't get vim-latex to work on my mac.
    I wouldn't say stupid, I might say the problem, as stated, is "extraordinarily nonspecific".

    The only possible interpretation I could think of was that you couldn't get LaTeX syntax highlighting to work in vim, which is totally reasonable. Doing a search for vim-latex makes me baffled. Why would someone incorporate all of these things into vim? I guess I see vim as a fancy editor as opposed to a productivity suite; "compiling" LaTeX seems best suited to other programs in my opinion.
  • You can't use lex?
  • The only possible interpretation I could think of was that you couldn't get LaTeX syntax highlighting to work in vim, which is totally reasonable. Doing a search for vim-latex makes me baffled. Why would someone incorporate all of these things into vim? I guess I see vim as a fancy editor as opposed to a productivity suite; "compiling" LaTeX seems best suited to other programs in my opinion.
    At the moment I'm using TextMate, which is working really well, but I'd rather get used to something open-source which works on all platforms. I though vim would be the way to go, since learning how to use it would help me with other things I'm doing. Having the highlighting, the macros and the "compiling" in one program seemed awesome to me.
  • You can't use lex?
    I'll look into that.
  • You can't use lex?
    I'll look into that.
    Typo, I meant LyX. Completely different!
  • Typo, I meant LyX. Completely different!
    I thought so. It was strange that I didn't find anything useful whilst googling. ;)

    I've used LyX before but I didn't like the interface, far too much clutter. I've been using LaTeX for a while and all I need is the highlighting, some macros and some sort of "live preview" function. I don't like LyX WYSIWYG approach.
  • I guess ~35 minutes is timely.
    On a forum? Hell yes it is. Also, it was less than that. Hell, it takes more time to type out a comment than selecting a line of text and hitting delete. Besides "It looked okay" is bullshit. The preview is WYSIWYG.
  • If anyone is interested in getting vim to work with LaTeX I found this.
Sign In or Register to comment.