Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Writing XML Into Page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Writing XML Into Page

 Post Reply Post Reply
Author
vshriniwasan View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2001
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote vshriniwasan Quote  Post ReplyReply Direct Link To This Post Topic: Writing XML Into Page
    Posted: 24 August 2003 at 2:01pm

I have been dealling with XML a lot lately and becasue of that I am trying to get better in it. My XML file looks like the following...

<main>
 <sec1>
  <part1>Name1</part1>
  <part2>Name2</part2>
 </sec1>
 <sec2>
  <part3>Name1</part3>
  <part4>Name2</part4>
 </sec2>
</main>

I want use ASP to write the value. I mean I want to be able to target saying sec1.part1.text will give me Name1. I can actually do it by using the following code. But I am going to have duplicate names under each section and that will creates name problems.

 Set xml = Server.CreateObject("Microsoft.XMLDOM")
 xml.async = False
 xml.load (Server.MapPath("page.xml"))

sec1 = xml.documentElement.childNodes(part1).text

Again what I want to do is

sec1 = xml.documentElement.sec1.part1.text



Edited by vshriniwasan
Back to Top
vshriniwasan View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2001
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote vshriniwasan Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2003 at 11:47am
So, no one has any idea about this problem...
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.