Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: extra xmlns >Thread Next - Re: extra xmlns Re: extra xmlnsTo: NULL Date: 2/2/2005 12:14:00 PM * stanley wrote in microsoft.public.xml:
>i am looing for a way to get the exactly xml:
><employee xmlns="x-schema:file:///E:\TK_SQL\EMPLOYEE-SCHEMA.XML">
><address /> ///NO XMLNS at all !!!
></employee>
Let me illustrate this again using JScript code,
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
var MyNode1 = xmlDoc.createNode(1, "employee", "x-schema:foo");
var MyNode2 = xmlDoc.createNode(1, "address", "x-schema:foo");
MyNode1.appendChild(MyNode2)
xmlDoc.appendChild(MyNode1);
WScript.Echo(xmlDoc.documentElement.xml);
If you run this script
c:\>cscript example.js
Microsoft (R) Windows Script Host, Version 5.6
Copyright (C) Microsoft Corporation 1996-2001...
<employee xmlns="x-schema:foo"><address/></employee>
It will print exactly what you want. So I am not sure how using
createNode instead of createElement did not solve your problem.
--
Björn Höhrmann · mailto:bjoern@h... · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
