[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Input Fields in XML
Bernd.Loepmeier@xxxxxx writes: > In the field I type "Bernd" and click the button. > > After klicking on the button I want to get a xml-file: > > <?xml version="1.0"?> > <Root> > <Name>Bernd</Name> > </Root> > > Are there any demo pages in the Web? How about a DOM version? Here's a script that will generate your XML file in IE5b2. Right now, it writes the result to the document, replacing it in the browser: <HTML> <HEAD> <TITLE>Input</TITLE> </HEAD> <SCRIPT LANGUAGE="JAVASCRIPT"> function Create_onClick() { var doc = new ActiveXObject("Microsoft.XMLDOM"); var nodProlog = doc.createProcessingInstruction("xml", "version='1.0'"); doc.appendChild( nodProlog); var nodRoot = doc.createElement("Root"); doc.appendChild( nodRoot); var nodName = doc.createElement("Name"); nodName.appendChild(doc.createTextNode(txtName.value)); nodRoot.appendChild(nodName); document.write(doc.xml); } </SCRIPT> <BODY> Name:<input type="text" id="txtName" size="20"/><BR> <input type="Button" id="cmdCreate" onclick="Create_onClick()" value="Press here to create XML file"/> </BODY> </HTML> __________________________________ SPX - Valley Forge T.I.S. 25691 Atlantic Ocean Drive Suite B-7 Lake Forest, CA 92630 USA www.vftis.com __________________________________ Tel: (949) 460 0094 Fax: (949) 460 0095 e-Mail: gpaiz@xxxxxxxxx __________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|