Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP/XML query
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP/XML query

 Post Reply Post Reply
Author
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Topic: ASP/XML query
    Posted: 04 May 2005 at 12:05am
Hi,
 
I'm extremely new to XML and I have to be honest the thing is confusing the absolute bejesus outta me. Im ok when I'm adding normal records, however, Im experiencing problems (ie I aint got a clue) when Im trying to add an attribute to the tag.
 

<skin id="1">
 
I've been trying to do this for like a day now and am going round in circles and all my searches on google are leading me to a blank. Please help guys !!!
 
Cheers
Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2005 at 12:52am
What is the problem you're having?

use Response.Write("<skin id=""1"">")
Back to Top
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2005 at 12:54am
Sorry. I dont think I made it too clear. I am writing to XML with ASP using an HTML form. I can write all of the tags but I cant attributes to them. I just need to know how to do this.
 
Many thanks
Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2005 at 12:57am
can you post the bit of code that giving you problems
Back to Top
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2005 at 1:03am
Aye sure
 

' Set the ID of the record

set nodeID = indexFile.createNode(1,"emote_id","")

set nodeText = indexFile.createTextNode(idArticle+1)

nodeID.appendChild(nodeText)
 
' Set the group ID this user must be a member of to use this emote

set nodeGroupID = indexFile.createNode(1,"emote_rank","")

set nodeGroupText = indexFile.createTextNode(intMinimumRank)

nodeGroupID.appendChild(nodeGroupText)
 
Instead of it writing standard XML syntax like this:
 

<skin_database>
  <skin>
    <id>some id</id>
  </skin>
</skin_database>
 
I want it to write with the attribute in the skin tag ... like this
 

<skin_database>
  <skin id="some id">
  </skin>
</skin_database>
 
I didn't want to revert back the first way because it looks neater in the second example. I know there's a way to do it but I just don't know what that way is and its bugging me now LOL.


Edited by bootcom - 04 May 2005 at 1:04am
Back to Top
Demon View Drop Down
Mod Builder Group
Mod Builder Group
Avatar
Mod-n-Skin Moderator

Joined: 26 July 2003
Status: Offline
Points: 299
Post Options Post Options   Thanks (0) Thanks(0)   Quote Demon Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2005 at 10:21pm
Check out www.w3schools.com
They have an awesome XML Tutorial. And the thing you'll be looking for is the .setAttribute function.
So Sayith the Demon.
Back to Top
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 2005 at 4:22am
Yeah, that was one of the first places I checked, but when I tried to use it it kept coming up with errors. I've even checked MSDN and that didn't work either. This is just too depressing LOL.
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.