4 Replies Latest reply on Apr 6, 2017 7:34 PM by Malcolm

    [ANN] XML DDR Query Tool


      I've just put an XML DDR Query tool online. Its built on the SimpleXML parser using PHP. I haven't set it up as a web service, it's bundled for you to download and install (presumably) onto your own machine and run on localhost.


      Download: The XML DDR Query Tool


      The XML DDR Query tool allows you to delve into your FileMaker databases in a way that isn't possible using FileMaker's built in functions. It's primary distinguishing factor is that it is fast. Other excellent tools already exist. They are great tools and they aim to be complete but they take some time to load a DDR. I found that the initial load time prevented me from doing ad-hoc work which would really benefit from DDR analysis. My XML DDR Query tool will answer your questions in less than the time it takes to load a DDR into other tools. I wanted to be able to dump the DDR to ask a single question without waiting an hour for it to be processed. I wanted quick answers. The XML DDR Query tool is my response to that need. Its not a 100% solution but it answers most of my questions, most of the time, in no time at all. It could help you too.

        • 1. Re: [ANN] XML DDR Query Tool

          Very interesting, Malcolm!  I'm playing around with this now and it is impressive.


          One thing I noticed is that there is a naming conflict with the Summary.xml file.  The file name dropdown in the header indicates that a person can load solutions.  That would work find for multiple files that are versioned (e.g. Contacts_fmp12_v1.xml, Contacts_fmp12_v2.xml) but all the files have the same name for the Summary.xml file.


          In any case, thanks for this tool.

          • 2. Re: [ANN] XML DDR Query Tool

            Yes, presently, it handles one solution at a time. Doing a comparison between v1 and v2 of a solution was one of the original goals for this tool. In my first attempt I ran into memory issues. SimpleXML is a memory hog and doing a full comparison of two mid-size DDRs would fail. The fact that there is no load time associated with the tool has allowed me to ignore this drawback. My immediate solution is to make a second copy of the tool and run them side by side, as shown below. [edit] I actually have them in tabs within the same window. When the two windows are in the same state, that is, showing the same data set and sorted in the same way, then any flicker as I switch from one tab to the other, is very noticeable. It is low-tech but surprisingly effective.


            I have been thinking that the way around the memory issues is to investigate one level at a time. For example, the tool could start by displaying count all the elements in each catalog of both DDR. Using the same sort of drill-down logic, the user could then keep drilling down to explore object counts and ultimately, reveal any object.


            Using two copies of the tool allows simple side-by-side comparison. Here's a screenshot of the summary of a file that has had a lot of development shows new base tables, TOs, Relationships, etc.



            The ability to sort the lists by table header is quite handy. Below we can see the scripts sorted by ID. In this case, we can see that the name of the script with ID 1 was changed from Startup to onFirstWindowOpen. Drilling into both, allows a quick visual comparison of the script contents.




            • 3. Re: [ANN] XML DDR Query Tool

              Many thanks for great tool!


              I need a modification for opening Japanese filenames on Windows,

              added a function then use this instead of simplexml_load_file

              function simplexml_load_file_sjis ($file, $class_name = "SimpleXMLElement", $options = 0){

                  $file_sjis = mb_convert_encoding($file, 'cp932', 'UTF-8');

                  $addslash_pass = addslashes($file_sjis);

                  return new SimpleXMLElement(@file_get_contents($addslash_pass));


              I'm not sure that ignoring options have bad effect...

              • 4. Re: [ANN] XML DDR Query Tool

                Cool. I hope it's useful.