navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Variable in XML string

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Variable in XML string
Page: [1]
 
chadb

 

Posts: 487
From: Kansas
Status: offline

 
Variable in XML string - 2/1/2008 9:16:01   
Can I put a variable in an XML string? Like:
dim mydate
mydate = date()
strXML = "<graph caption='AMC Performance' subcaption='Bookings'

I want to add mydate after Booking

Thanks
Chad
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Variable in XML string - 2/1/2008 9:47:09   
Not quite sure what you mean.

XML will not parse a VBScript / ASP variable. XML by it's nature is not a scripting language but a structured text document.

Are you trying to add variable data on-the-fly?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to chadb)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Variable in XML string - 2/1/2008 9:48:40   
quote:

strXML = "<graph caption='AMC Performance' subcaption='Bookings'


Is this what you're trying to do?

strXML = "<graph caption='AMC Performance' subcaption='Bookings' " & myDate & ".....

Something like that? If this code is on an ASP page, it should add the date to that string.


_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to rdouglass)
chadb

 

Posts: 487
From: Kansas
Status: offline

 
RE: Variable in XML string - 2/1/2008 9:50:35   
quote:

Is this what you're trying to do?


Yes, I will try that. Thanks

(in reply to rdouglass)
chadb

 

Posts: 487
From: Kansas
Status: offline

 
RE: Variable in XML string - 2/1/2008 17:54:40   
quote:

" & myDate & ".....


I tried, and get invalid xml data:
subcaption='Bookings- as of ' "& myDate &" face='Arial'

(in reply to chadb)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Variable in XML string - 2/2/2008 10:13:18   
quote:

strXML = "<graph caption='AMC Performance' subcaption='Bookings' " & myDate & ".....


Oh, I think I get it; you want to add the date to the caption right? Not as an element?

strXML = "<graph caption='AMC Performance' subcaption='Bookings " & myDate & "' .....

See where I put the apostrophe? I had that before the date on my example but the text needs to be completely inside the apostrophes. That make sense?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to chadb)
chadb

 

Posts: 487
From: Kansas
Status: offline

 
RE: Variable in XML string - 2/2/2008 12:06:23   
Ahh, that makes sense. Thank for the help!!

(in reply to chadb)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Variable in XML string
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts