Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: extra xmlns [Thread Next] Re: extra xmlnsTo: NULL Date: 2/3/2005 4:05:00 AM
"Bjoern Hoehrmann" wrote:
> * 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/
>
thanks a lot bjoern - it's works now - your answers were helpful
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
