Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Render XML file in DIV

Status
Not open for further replies.

Geates

Programmer
Aug 25, 2009
1,566
US
I wrote a vbs script to parse and filter large log files into xml. The xml document is then opened and rendered in a browser. There are several manual steps involved in this process and I'd like to bring the steps together and do the parse, filter, and xml render in an HTA. The problem I'm having is rendering an xml file within a div. I can dump the contents of the xml file into a div as text but that's not very helpful.

Google suggests that people have been faced with a similar issue before. The recommended solution is to use jquery to load the file. Unfortunately, that is not really an option at the moment. Any suggestion?

-Geates

 
im a bit confused as to what you are trying to accomplish?

Are you talking about styling the data dump? A bit more context would help, are you only talking about displaying the XML in the browser or is it within a section of an already existing page?

Darryn Cooke
| Marketing and Creative Services
 
Essentially, I've written a script to produce an XML file. When I open the XML file in a browser, it renders interactively (I can expand/collapse tags). I want to be able to show the XML file interactively within an element within an existing html file (<object> and <embed> come to mind). I am able to display the XML contents as text in the element. Here's a mockup of what I would like to do.

Code:
<body>
   <script language="vbscript">
      sub parse(filters)
         ...
         [highlight #FCE94F]results.innerhtml = the actual XML File - no styling[/highlight]
      end sub
   </script>
   Source File: <input type="file" id="srcFile">
   <br>

   Filter(s): <input type="text" id="filters">
   <button onClick="parse(filters.value)">Parse</button>

   <div id="results"></div>
</body>

I hope things are a little clearer :)

-Geates

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top