W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2010

Query(How Delete Attribute in xml file?)

From: Mrinmay Paul <paulmrinmay@gmail.com>
Date: Wed, 28 Jul 2010 11:03:58 +0530
Message-ID: <AANLkTik4CG9Nc9eEF1tZX+_CQCfbj-kiQm_EwWp5KCH5@mail.gmail.com>
To: www-dom@w3.org
Hi,

i have a xml file. the data is like below :

xml version="1.0" encoding="UTF-8" standalone="no" ?>
- <Envelope xmlns="http://edavki.durs.si/Documents/Schemas/DDV_O_7.xsd"
xmlns:edp="http://edavki.durs.si/Documents/Schemas/EDP-Common-1.xsd"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://edavki.durs.si/Documents/Schemas/DDV_O_7.xsd">
- <edp:Header xmlns:edp="http://edavki.durs.si/Documents/Schemas/DDV_O_7.xsd
">
- <edp:taxpayer>
<edp:taxNumber>77777777</edp:taxNumber>
<edp:taxpayerType>PO</edp:taxpayerType>
<edp:name>CRONUS International Ltd.</edp:name>
<edp:address1>5 The Ring</edp:address1>
<edp:address2>Westminster</edp:address2>
<edp:city>London</edp:city>
<edp:postNumber>1</edp:postNumber>
<edp:postName>London</edp:postName>
<edp:maticnaStevilka />
<edp:resident>true</edp:resident>
</edp:taxpayer>
<edp:responseTo />
<edp:domain />
</edp:Header>
<edp:Signatures xmlns:edp="
http://edavki.durs.si/Documents/Schemas/DDV_O_7.xsd" />
- <body>
<edp:bodyContent xmlns:edp="
http://edavki.durs.si/Documents/Schemas/DDV_O_7.xsd" />
- <DDV-O>
................
..............

Now i want to delete the attribute in element <EDP:Header>(Bold portion).
means i want to modify
<edp:Header xmlns:edp="http://edavki.durs.si/Documents/Schemas/DDV_O_7.xsd">
to <edp:Header> only.
i am using Automation.

Please help me to remove the attibute & let me know how to do it?

i am using DOM of Microsoft XML, v3.0

Rehrads,
Mrinmay
Received on Thursday, 29 July 2010 06:36:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:05 GMT