473,396 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

asp / sql code in xml file possible? or other options to retrieve recordset in xml

120 100+
hi guys - okay I've already asked this question in the xml section here but I'm not having much luck.

I have an xml file which we send to a 3rd party company - the 3rd party company then utilises this xml file that they are expecting.

in the xml there is a price tag and all I want to achieve is to be able to retrieve a value from our sql db and then to place this value within the xml price tag.

I've tried
Expand|Select|Wrap|Line Numbers
  1. <price><![CDATA[ ASP CODE HERE ]]></price>
  2.  
and also as an include
Expand|Select|Wrap|Line Numbers
  1. <price><![CDATA[ <!--#include virtual="price.asp" --> ]]></price>
  2.  
both of these methods dont work. now I've read on w3 schools that you can insert a js script using the cdata method -
link is here

as the 3rd party company expects to receive the xml file i must continue this - but is there any way to retreive the price value from a sql db and then to insert this within the xml price tag??

thanks in advance
Omar.
Apr 27 '10 #1
5 1940
Frinavale
9,735 Expert Mod 8TB
Why didn't it work?
What was the XML output generated?

-Frinny
Apr 27 '10 #2
omar999
120 100+
rather than displaying the value from the db the entire asp code is output revealing connection string, password etc and other sensitive information.
Apr 27 '10 #3
Frinavale
9,735 Expert Mod 8TB
Did you create an .asp file that generates the XML?

Is it being executed properly? It has to be executed as an asp file...which will generate the XML...

How are you accessing the file?



-Frinny
Apr 27 '10 #4
omar999
120 100+
hi frinny

i dont have an asp file generating the xml - from what I've been reading and advised maybe this IS the problem??

Ideally I'd like to add some asp code to the xml tag... is this not possible?

otherwise I will need some sort of asp script to generate the xml am i right?

thanks in advance
Omar.
Apr 27 '10 #5
Frinavale
9,735 Expert Mod 8TB
Yes that Is the problem.

ASP (Active Server Pages) is executed as a script and generates output (text). Commonly this text is HTML which is sent a web browser that has requested the ASP script. The script typically dynamically generates the HTML to create a dynamic website.

ASP doesn't have to output HTML though...it could output anything really.
In your case you want it to output XML.

What I'm wondering is how you are using this?
What is your application?
Is it a web application?
How are you planning on calling the script?

There are many ways to generate XML files...depending on what technology you are using and what type of application you are developing.


-Frinny
Apr 27 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Kingdom | last post by:
I'm using this script to dynamicaly populate 2 dropdowns and dispaly the results. Choose a component type from the first drop down, lets say 'car' and the second box will list all the car...
2
by: Sunshine | last post by:
My original thought was to save the recordset into a text file. However, because of permissions I am unable to do this and will not be able to change the permissions. My next thought was to open...
45
by: Steven T. Hatton | last post by:
This is a purely *hypothetical* question. That means, it's /pretend/, CP. ;-) If you were forced at gunpoint to put all your code in classes, rather than in namespace scope (obviously classes...
11
by: Shawn Milo | last post by:
I put this together yesterday, and I thought I'd share it. It works in both IE and Mozilla Firefox. I posted something similar to this months back, but it was much longer, and only worked in IE....
4
by: pamelafluente | last post by:
I am trying to pass a javascript variable to ASP. It almost works, except for the postback part. Infact if one clicks on the div and on the button it can be seen that the variable passes...
3
by: jpr | last post by:
Hello, I have a form on which I have a cmdbutton to copy a couple of fields into another table (MASTER) using the SSN on the active form as criteria. In the active form (based on a tables...
4
by: Kosmos | last post by:
Hey guys...as a relatively new programmer, I try to give back where I can. Below is the code for a useful program I believe many of you could use...just don't use the same exact code because...well I...
5
by: Eric Layman | last post by:
Hi, Many years ago when I first learnt abt web dev in school, I was taught this methodology: <html> blah blabh
1
by: rn5a | last post by:
I want an ASP app to retrieve records from a MS-Access database table but display them in a HTML table but I want the HTML table table to display only 7 records in a row (<tr>...</tr>) in 7...
1
by: Subrato | last post by:
Hi, I am very new to xml and I have this piece of code which I took off a website. The situation is that on of the website, user files up a form and it is submitted. On submission, the page should...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.