Welcome to TalkGraphics.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Search and Replace for HTML

    If there is a lot of custom HTML embedded in the pages (placeholders, tracker, <head>) it would be useful to have a global search and replace function.

    At present if I need to change some HTML that exists in many different locations on a site I need to go to each placeholder and manually look for the HTML and again change by hand.

    A function to do this for me either across all pages or just the current page would save me a huge amount of time.

    I would envision it as being no different to a standard Search and Replace function found in any text editor.

  2. #2
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: Search and Replace for HTML

    A global search and replace isn't possible because the html code does not exist within Web Designer or Xtreme. HTML is only created during export. The export filter processes the objects (graphics, text, etc.) and writes html and css code on the fly.

    Use your favorite plain text editor (notepad++, notepad, notepad2, etc.) to edit the exported file. Be aware that you could make changes that will adversely effect the web page or pages.
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: Search and Replace for HTML

    Hi Bill

    Thanks for the reply. I appreciate that the HTML created BY Xara only exists at the point of export, however I was referring to the custom HTML you can enter yourself in placeholders, tracker boxes and Custom HTML boxes. These do exist as plain text because that is what you enter.

    I use the exact technique you recommend at present (cut out and edit in a dedicated text editor), but this gets to be a real chore if you have more than a small amount of custom HTML in your pages and easily leads to mistakes in the process.

    I had tried looking at the .web file in a text editor in the hope this HTML may be stored in a plain text format but this does not appear to be the case - it's all binary gibberish!

  4. #4
    Join Date
    Jul 2007
    Location
    Brockville, Ontario, Canada.
    Posts
    4,619

    Default Re: Search and Replace for HTML

    As Bill said - There is no html in the .web file ......
    Keith
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    There are 10 types of people in this world .... Those who understand binary, and those who don't.

  5. #5
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: Search and Replace for HTML

    Hello Keith

    Bill's point was that the HTML content created by XWD only exists as HTML when you export your document as HTML - the whole web site in it's .web format in a proprietry binary format unique to Xara, meaningless to anything else other than Xara. Trust me, I do fully understand this concept

    However this binary content is totally distinct from the HTML content that XWD allows you to MANUALLY enter yourself (via placeholders, trackers, cutom html) which is plain text and as such XWD could have a feature implemented that allows this content to be searched through.

    My last observation was simply that this plain text is not retained in the .web file in a human readable format - it is somehow encoded. This is actually pretty irrelevant anyway because even if my HTML content was retained as plain text I wouldn't be confident that a search'n'replace on a .web file in a text editor wouldn't risk trashing it.

  6. #6
    Join Date
    Jul 2007
    Location
    Brockville, Ontario, Canada.
    Posts
    4,619

    Default Re: Search and Replace for HTML

    Sorry, Now I understand ...... and if I'd read the earlier post properly, I'd have probably understood earlier!
    Keith
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    There are 10 types of people in this world .... Those who understand binary, and those who don't.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •