472,372 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 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 2121
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.