[
Lists Home |
Date Index |
Thread Index
]
- From: "Steve Muench" <SMUENCH@us.oracle.com>
- To: <xml-dev@ic.ac.uk>
- Date: 07 Jun 99 07:23:02 -0700
I don't quite understand the comment about replacing
a named temporary buffer for XML sent to me from a server
by a namespace, but here's an example of posting an
XML data island to a server:
function postTextAreaXMLToServer() {
// Get a new XML Document (these 3 lines not required if
// "doc" was already the name of an XML Data Island
// in the page). In my example I let the user type in
// an XML document in a TEXTAREA on the form whose
// name="toSend". doc.loadXML() loads raw text and parses
// it as an XML document.
var doc = new ActiveXObject("Microsoft.XMLDOM");
doc.async = false;
doc.loadXML(toSend.value);
// Get an instance of the HTTP Request/Response Object
var msg = new ActiveXObject("Microsoft.XMLHTTP");
// Open an HTTP message to define its characteristics
msg.open("POST","http://smuench-lap/echoxml.jsp",false);
// Send the "doc" XML Document (/Data Island)
msg.send(doc);
// Interpret the response. In this case my server JSP page
// parses the sent XML file and sends back the same XML
// file as a "text/xml" mimetype (an echo test).
toReceive.value = msg.responseXML.documentElement.xml;
}
See:
http://msdn.microsoft.com/xml/reference/scriptref/XMLHttpRequest_object.asp
For complete details...
_________________________________________________________
Steve Muench, Consulting Product Manager & XML Evangelist
Business Components for Java Dev't Team
http://www.oracle.com/xml
- From: "Matthew Sergeant (EML)" <Matthew.Sergeant@eml.ericsson.se>
- To: "'Owen Synge'" <owen.synge@meadowhouse.co.uk>, XML development <xml-dev@ic.ac.uk>
- Date: 07 Jun 99 02:43:58
> -----Original Message-----
> From: Owen Synge [SMTP:owen.synge@meadowhouse.co.uk]
>
> I have been looking at the microsoft web pages (even though at hart I am
> a linux user) for XML examples, unfortunately I am yet to work out what
> to do with data islands once I send them to the client. Can they send
> them back to my server, or can they save them to disk, please help, or
> if you know a URL to demo these facilitys with out useing active server
> pages I would be most pleased.
>
Am I the only person that has come to the conclusion that XML Data
Islands are a really bad idea? I hope MS see it the same way, and deprecate
them in favour of namespaces instead.
As an answer to your question, you have to do something with them in
Javascript (or heaven forbid: vbscript). I don't know the IE object model
well enough to know if you can save them to disk, but I'm sure you can
probably send them back to the server if you really want to.
Matt.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|