Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding namespaces 1

Status
Not open for further replies.

sjakiePP

Programmer
Apr 6, 2004
104
0
0
NL
Hello all,

In Excel 2003 I want to copy the contents of XML files. I open the original and copy the content to a new xml file. Also I can change the number of a certain element, the first one under the root element. My xml files contain namespaces.

This is done with help of XPath. But to use this I have to add the namespaces (XMLDoc.setProperty "SelectionNamespaces", strNs. strNS is a variable that contains the namespaces).

When I run the script for the first time, everything works. But the second time I get error number -2147467259 and the text says "Duplicate attribute".

What causes this and how do I resolve it?

If my description is not clear please ask.

Thanks in advance,
Sjakie.

---------------------------------------------
Yes, the world is full of strange people.
 
>[self]You have to double up the uri, like this.
[tt]You have to double up the [red]quote[/red], like this.[/tt]
 
Hello tsui,

My code has been stripped down. It is exactly like your example.

The quote is not a problem, all the namespaces come from an excel worksheet.

Many thanks for your help!

---------------------------------------------
Yes, the world is full of strange people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top