7 Replies Latest reply on Nov 26, 2008 10:11 AM by MergeThis

    Recreating HHC from the XML file

      How or Can I re-create the HHC file from the whtdata0.xml file stored in the "!SSL!\WebHelp\whxdata", folder. In a specific case, I do not have the project file and has to create the TOC for the project.
        • 1. Re: Recreating HHC from the XML file
          RoboColum(n) Level 5
          Hi dsilvashelly and welcome to the RH community.

          I think the answer to your question is "not easily". Why is this required? Are you only updating the TOC or have you also made topic amendments. Don't forget that part of the webhelp output includes searchable output which will not get updated by amending the TOC.

          If you really, REALLY have no access to the source files you could save the XML file as the project's HHC file (after all the usual backups of course) and use a find and replace utility to replace the <book name=abc> tags and replace them with the <param name="Name" value=abc> tag. But you'd have to strip out all the other unnecessary XML and add the other necessary .HHC stuff. It may be best to start with a blank HHC file, add the XML and then do a find and replace.
          • 2. Re: Recreating HHC from the XML file
            Captiv8r Adobe Community Professional & MVP
            Hi Shelly

            I would be totally surprised if you were able to re-create the TOC structure simply by modifying the XML. This is because unless whomever created the WebHelp to begin with deviated from the default setting, the structure is likely divided across several XML files. Each one containing just a segment of the TOC.

            Building the TOC isn't really an overly difficult process anyway. If I were in your shoes, I might approach it by first getting all the topic content into the project cleanly. (removing all the added JavaScript code) Then edit the TOC and click Tools > Auto-Create TOC to get the foundational structure in place. From there it would be pretty easy to create Books where needed and rearrange the pages.

            Cheers... Rick
            • 3. Re: Recreating HHC from the XML file
              Level 1
              Hi,
              As you have mentioned I tried performing the find and replace method, but it requires lot of efforts to write extra lines of html codes to make the xml file to hhc. Creating TOC from the scratch is much easier than this.

              I was just wondering if there is any tool to perform this action of converting the xml to hhc. :)

              Shelly
              • 4. Re: Recreating HHC from the XML file
                RoboColum(n) Level 5
                Hi Shelly.

                No there isn't. I once knew an engineer who took the a Ford Fiesta (a small family car sold in the UK) and put a four litre engine in it. Yes it can be done but not without a fair amount of difficulty. In his case, weilding additional steel to the chassy to support the additional weight. Doing what you want is a bit like that ;-)
                • 5. Re: Recreating HHC from the XML file
                  Level 1
                  Hi,

                  The reason I asked if there is a tool is, as I could find a tool to de-compile a chm file. http://www.keyworks.net/keytools.htm
                  • 6. Re: Recreating HHC from the XML file
                    Captiv8r Adobe Community Professional & MVP
                    Hi Shelly

                    WebHelp is not compiled as a .CHM is. Besides, the person that created that decompiler is the person that created Microsoft HTML Help format at Microsoft.

                    Unfortunately no tool exists for this. At least not presently. I suppose if the Adobe developers received enough requests via the Wish Form, they might consider a tool to convert a WebHelp output back to working source.

                    Click here to view the WishForm/Bug Reporting Form

                    Cheers... Rick
                    • 7. Re: Recreating HHC from the XML file
                      MergeThis Level 4
                      BTW, are you aware that you can't use the output topic files in a RH project? The output files carry a lot of javascripting for table formatting, tooltips, addTocInfo, etc. (usually a screen and a half of code when viewed in Notepad), and the RH project will usually choke on that stuff.


                      Good luck,
                      Leon