INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Render XML file in DIV

Render XML file in DIV

(OP)
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

http://ns7.webmasters.com/caspdoc/html/vbscript_la...

RE: Render XML file in DIV

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
www.darryncooke.com | Marketing and Creative Services

RE: Render XML file in DIV

(OP)
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)
         ...
         results.innerhtml = the actual XML File - no styling
      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

http://ns7.webmasters.com/caspdoc/html/vbscript_la...

RE: Render XML file in DIV

I think JQuery / AJAX could pull it in as text, you could even use an XLST for formatting as well.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

RE: Render XML file in DIV

looks like a job for JQUERY to do what you want.

Out of curiosity why dont you just wrap the script file in the DIV?

Darryn Cooke
www.darryncooke.com | Marketing and Creative Services

RE: Render XML file in DIV

(OP)
Script file?

Even though this is clearly a job for jQuery, I'm going to avoid using anything non-native to IE. A connection to the outside world cannot be guaranteed.

-Geates

http://ns7.webmasters.com/caspdoc/html/vbscript_la...

RE: Render XML file in DIV

so keep all the files you need on your local server. there is nothing stopping you from doing that.

Darryn Cooke
www.darryncooke.com | Marketing and Creative Services

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close