473,387 Members | 3,820 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,387 software developers and data experts.

XML - load contents onto page.

Hello,

We have a web site using CLASSIC ASP, and a client with what would appear to
be a non conforming XML document.

Their remote XML document in its entirety looks like so:

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://clients.domainname.net">qwerty500</string>
I do not have experience in XML retrieval, but I have been tasked with
taking the "qwerty500" value and displaying it on an ASP page on our clients
site. Getting the XML host to change their file is a no go. The little I
do know about XML suggests to me, the XML document has various requirements
missing such as a document element and a parent / child structure? I have
worked with other XML documents and managed to get them to display,. nut
they all had child nodes etc. This one has me stumped.

Any help or ideas greatly appreciated.

Regards,

Mark.
Oct 10 '06 #1
2 2167
SuperMario wrote:
Hello,

We have a web site using CLASSIC ASP, and a client with what would
appear to be a non conforming XML document.

Their remote XML document in its entirety looks like so:

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://clients.domainname.net">qwerty500</string>
I do not have experience in XML retrieval, but I have been tasked with
taking the "qwerty500" value and displaying it on an ASP page on our
clients site. Getting the XML host to change their file is a no go. The
little I do know about XML suggests to me, the XML document has
various requirements missing such as a document element and a parent
/ child structure? I have worked with other XML documents and
managed to get them to display,. nut they all had child nodes etc. This
one has me stumped.
Seems pretty straightforward to me:

<%
dim xml, xmldoc,node
xml="<?xml version=""1.0"" encoding=""utf-8""?>" & _
"<string xmlns=""http://clients.domainname.net"">qwerty500</string>"
set xmldoc=createobject("msxml2.domdocument")
xmldoc.loadXML xml
set node=xmldoc.selectSingleNode("//string")
Response.Write node.text
%>

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Oct 10 '06 #2


SuperMario wrote:

We have a web site using CLASSIC ASP, and a client with what would appear to
be a non conforming XML document.

Their remote XML document in its entirety looks like so:

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://clients.domainname.net">qwerty500</string>
I do not have experience in XML retrieval, but I have been tasked with
taking the "qwerty500" value and displaying it on an ASP page on our clients
site. Getting the XML host to change their file is a no go. The little I
do know about XML suggests to me, the XML document has various requirements
missing such as a document element and a parent / child structure?
There is nothing wrong with that XML sample, it has a single element
(document element or root element) with local name |string| in the
namespace with URI http://clients.domainname.net and that element has a
single text node as its only child node. So use any MSXML version you
have on your server and load the XML and access the text property of the
root element e.g.

Set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0");
If xmlDoc.load("http://example.com/file.xml") Then
Response.Write xmlDoc.documentElement.text
Else
' handle parse error here
End If
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shabam | last post by:
A web application of mine developed using C# + MS SQL runs fine normally. However when I stress test it with a load testing software (using about 60 simultaneous users) some instances start...
5
by: N | last post by:
Hi, I got an error during load on a couple of the tables. And it seems to be complaining that I'm running out of tempspace (possibly during index rebuild). Below is the load command and error....
1
by: Magdelin | last post by:
Hi, I have a BasePage class from which all other ASPX pages of the project is inherited. The BasePage class implements Page_Load event handler. All child pages have its AutoEventWireUp property...
1
by: Reza Nabi | last post by:
Bakground: I have a webform (LoadCtl.aspx) which loads the user control to a placeholder dynamically based on the ctlName querystring passed in the URL. Webform (LoadCtl.aspx) also passes a...
1
by: urs | last post by:
Two days ago, I built an ASP.NET 2.0 application and published it on a shared IIS 6 Web server. After publishing, and during the whole day, it worked fine. The server remained untouched since....
4
by: Ravi Ambros Wallau | last post by:
Hi: We developed a set of ASP.NET Web Applications that never runs in stand-alone mode, but always inside a portal (Rainbow Portal). All modules are copied on that portal. My question is: load...
5
by: Ravi Ambros Wallau | last post by:
Dear friends: This is my third question on this news in three days... Sorry for this spam behavior :-) I've a lot of problems on "first page load" after some change on web.config or even in the...
7
by: Jonathan Smith | last post by:
In VB i had some very very simple code that would print out the contents of a textbox for me. It was simply Sub PrintTB() Printer.Print(Text1.Text) End sub Very simple, and 110% effective.
3
by: makeeasy | last post by:
hi to all.... I ve completed mca in 2007 I am doing a small project using javascript ajax and php. I am new to these techonologies.... In that i ve a form with a slide menu which conists of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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,...

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.