XMLlint - how to install?

XMLlint - how to install?

2
NewbieNewbie
2

    Jun 25, 2006#1

    Hello,

    I recently installed the UE version 12.10a with build in XMLlint support.

    In the first step I managed to activate the menu entry "Tool XMLlint" which is not active by default :-(

    But the XMLlint Tool seems not to work. Tried some functions (eg. format) with no success.

    - Do I have to install the XMLlint tool manually (from xmlsoft.org)?
    - Or is the XMLlint tool build in?
    - How to configure in UE?
    - Does anybody has a working example?

    Thanks for help in advance,

    matt

    6,686585
    Grand MasterGrand Master
    6,686585

      Jul 02, 2006#2

      I have never used nor installed XMLlint and the documentation is really extremly poor for it.

      I guess, you have to download the latest libxml2 package for win32 from xmlsoft.org. It contains the directory bin with the compiled binaries you need. According to the readme.txt of this package unpack the 3 files anywhere. Best would be either in the Windows directory (is included in the PATH environment variable) or in the subdirectory GNU of the UltraEdit program directory.

      As a screenshot (now in help of UE) shows you should be able to configure then the XMLlint tool within UltraEdit.

      I have found in uedit32.exe the following lines:

      99993="Select XMLlint.EXE ..."
      99994="XMLlint Executable (*.exe)|*.exe||"
      99995="xmllint.exe"

      According to these lines I think there must be a dialog where you can specify the path and name of the XMLlint tool.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Jul 02, 2006#3

        Hello Mofi,

        thanks for your answer, but the issue is still not solved.

        The Tool XMLlint dialog appears in UE. The parser seems to work, but the results are not as expected.

        - the function "Reformat and reindent the output, where indention is [ 4 ]" fails with no output (--format)
        - once the --format option fails, the output is converted to a single <xml></xml> line, even if the input xml file is formatted and indented
        - the option "Output results as an HTML file" failes with no effect (--htmlout)
        - the option "Output Timing information" fails with no effect (--timing)
        - In case of not well formed XML the Tool opens a popup saying 'Unclassified error' - I am expecting the original XMLlint messages with error code and line number
        - I get Popups with "Validation error", "Error in DTD" - but I am missing the xmllint parser error messages


        >I guess, you have to download the latest libxml2 package for win32 from xmlsoft.org.

        - I downloaded XMLlint (xmllint.exe, libxml2.dll, zlib1.dll) and tried all locations (WINNT, UE dir, GNU dir, GNU/xmllint/, xmllint.exe in in the PATH list) with no effect and no success.
        - I have a XMLlint installation running on my system (in the DOS box - but not in UE). That is where I get the expected results.
        - The parser seems to work, but not like I expected - so I'm still not sure if I have to install XMLlint manually or not.


        Does anybody has installed UE with XMLlint and, for example, succesfully reformat and reindent the output with indention=4?

        Regards, matt

        16
        Basic UserBasic User
        16

          Sep 07, 2006#4

          I am also looking for the solution for this problem. I downloaded the tool. Put it in different subdirectories of the GNU folder, but everytime I try to reformat a XML file I get an error message in UEStudio ('Error writing output') and I end up using the tool sepperately from UE. How to fix this?

          1
          NewbieNewbie
          1

            Oct 27, 2006#5

            Jurriaan wrote:I am also looking for the solution for this problem. I downloaded the tool. Put it in different subdirectories of the GNU folder, but everytime I try to reformat a XML file I get an error message in UEStudio ('Error writing output') and I end up using the tool sepperately from UE. How to fix this?
            Jurrian, did you ever find a solution for this? I'm having the same issue.

            Thanks,
            Scott

            2
            NewbieNewbie
            2

              Nov 01, 2006#6

              I am also looking for help with XMLlint. Cannot get the parser to reformat XML. Anybody?

              6,686585
              Grand MasterGrand Master
              6,686585

                Nov 01, 2006#7

                Maybe somebody should ask the IDM support be email and post the answer here after configuring XMLlint with the help of IDM support.
                Best regards from an UC/UE/UES for Windows user from Austria

                3
                NewbieNewbie
                3

                  Jan 03, 2007#8

                  I am back on UE 10.10a (sorry, corporate policy / supported version).

                  In that version of UE, I am able to use xmllint as an external tool to format a tab/file's content -- specifically, I use the Windows binaries found, per this page

                  http://xmlsoft.org/downloads.html

                  at this page

                  http://www.zlatkovic.com/libxml.en.html

                  However, it only seems to work when, in the UE "Tool Configuration" dialog, I check the checkbox "Capture Output" found in the controls group labeled "Command Output (DOS Commands). When I uncheck this box, my file is not formatted (and, without output, I'm left wondering why).

                  So, after running the tool I have to close a new tab that contains the command output (empty when the command, as I have it configured, is successful). But at least it does do the formatting.

                  By the way, xmllint outputs only to stdout unless you tell it to write to a file. So, my UE tool command is defined as:

                  "full path to xmllint.exe" --format --output "%f" "%f"

                  I didn't locate the program on my defined path. Substitute for "full path to " as appropriate, if you try this.

                  6,686585
                  Grand MasterGrand Master
                  6,686585

                    Jan 03, 2007#9

                    To pasbesoin:

                    A hint to avoid the empty file tab caused by capturing the output:

                    Select in the tool configuration Output to List Box. Then the captured output will be shown in the automatically opened output window. But the output window is opened automatically only when something is really captured. If xmllint run was 100% successful, the output window will not open because nothing was captured.
                    Best regards from an UC/UE/UES for Windows user from Austria

                    3
                    NewbieNewbie
                    3

                      Jan 05, 2007#10

                      Hi, Mofi,

                      I tried that, as well as some other seemingly likely tool configuration variations, but only the configuration that I described above worked.

                      Further, today -- after my system was shut down for the night -- I'm finding the tool command I set up is no longer working, even though I didn't change it. Now, it complains that:

                      Code: Select all

                      'C:\Documents' is not recognized as an internal or external command,
                      operable program or batch file.
                      Even though I have the full path to the executable quoted in the command specification:

                      Code: Select all

                      "C:\Documents and Settings\[userId]\My Documents\bin\xmllint.exe" --format --output "%f" "%f"
                      Go figure. This exact same configuration worked when I described it, above. I've tried re-editing it; no luck. Also editing it to something else, then back to the original; still no luck.

                      Anyway, it's not too often anymore I get to use the following salutation, so forgive me if the context is not entirely appropriate:

                      Servus!

                      6,686585
                      Grand MasterGrand Master
                      6,686585

                        Jan 05, 2007#11

                        Have you also checked Show DOS Box?

                        Especially on Win98 console applications are often not recognized as program when I have not checked this option even when everything is correct. So I have checked it now for every user tool which is a console application.

                        For example on Win98 I cannot run the internal DOS command dir with Avanced - DOS Command, if I do not enable also Show DOS Box in the dialog. I detected this after IDM has changed something in v11.00a as listed in readme.txt with the line:
                        Fixed issues with capture output from tools not always working
                        I have also reported this to IDM, but it looks like this problem does not exist on WinXP because on WinXP dir without Show DOS Box is working.
                        Best regards from an UC/UE/UES for Windows user from Austria

                        3
                        NewbieNewbie
                        3

                          Jan 06, 2007#12

                          Mofi,

                          It turns out that execution was choking on the spaces in the filename parameters. Only after I changed BOTH parameters to instead use the DOS 8.3 format (changed '%f' to '%F') did execution begin completing successfully. With the 8.3 format, quoting the parameters is no longer necessary, so either of the following works:

                          Code: Select all

                          "C:\Documents and Settings\userId\My Documents\bin\xmllint.exe" --format --output "%F" "%F"
                          
                          "C:\Documents and Settings\userId\My Documents\bin\xmllint.exe" --format --output %F %F
                          I was concerned that this might cause long file names to be converted to 8.3 format when xmllint writes output to them, but that is not the case. Long file names remain intact.

                          By the way, when I whipped up my first version of my tool configuration, I was using a file path/name that didn't contain any spaces. That's why it initially worked.

                          Thanks for the tip about combining settings "Output to List Box" and "Show DOS Box". After deducing the above change to '%F', I tried that combination of settings, and with it I get successful execution without the side effect of an opened tab for (empty) command output. Good stuff!

                          Regards