1

I really need your help on this one. We have a monitoring tool, that monitors (what else :) ) SQL/Diskspace/Servers/WindowsServices/.... We keep the objects that need to be monitored inside a range of XML-files (not my choice)

Right now they look like this

   <Root>
      <item></item>
      <item></item>
   </Root>

Example (for sql Queries)

   <SqlQ>
      <sql Connectionstring= "XXX" ExpectedResults="XXX" Query="XXX" ...></sql>
      <sql Connectionstring= "XXX" ExpectedResults="XXX" Query="XXX" ...></sql>
   </SqlQ>

Right now, for some unknown reason he wants to re-oder only the SQL-Queries. He wants them in collapsible blocks for each database. like this:

   <SqlQ>
      <dbA>
          <sql Connectionstring= "XXX" ExpectedResults="XXX" Query="XXX" ...></sql>
          <sql Connectionstring= "XXX" ExpectedResults="XXX" Query="XXX" ...></sql>
      </dbA>
      <dbB>
         <sql Connectionstring= "XXX" ExpectedResults="XXX" Query="XXX" ...></sql>
         <sql Connectionstring= "XXX" ExpectedResults="XXX" Query="XXX" ...></sql>
      </dbB>
   </SqlQ>

so he may collapse them:

   <SqlQ>
      <dbA>...</dbA>
      <dbB>...</dbB>
   </SqlQ>

Is there any to implement/emulate this behavior (similar to #regions (.net) in xml) without altering the the actual structure of the xml (viewed from the monitoring tool). Adjustments to the actual code (of monitoring-tool) would results in a massive overhead (as we use generic functions to read these xml-files.

Something along the lines of this but then collapsible.

Note: We're using Notepad++ for modifications. And yes i know of the existance of Alt+1

Community
  • 1
  • 1
User999999
  • 2,500
  • 7
  • 37
  • 63
  • You don't want to change the XML used by the monitoring tool, but you want to view the XML (in another application? which one?) with a different structure. Is that what you want? – helderdarocha Apr 11 '14 at 14:40
  • yes. They use Notepad++ for modifications of the XML. I've searched through the possible plugins for a solution. but sofar 'no dice'... If my wish is impossible so be it. But even if there is the slighest chance of finding a solution i would more then happy to give it a try – User999999 Apr 11 '14 at 14:45
  • Well, you could use XSLT to produce a XML with a different structure using your original XML as a source. It's quite simple. – helderdarocha Apr 11 '14 at 14:53
  • @helderdarocha would the changes being made inside the modified XML (generated through XLST) also be persisted to the original XML? – User999999 Apr 14 '14 at 06:33
  • No. Unless you replace the original XML with the new one. If you consider XSLT as an option, add the `xslt` tag to your question. – helderdarocha Apr 14 '14 at 13:27

0 Answers0