Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2005, 12:48 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML DOM :modifying the existing nodes attributes i

I am using MSXML 4.0 parser to parse the XML documents in VC++.I can add nodes to the existing document, add attributes to them or modify their attributes.
I whould like to know that how I can add or modify the attributes of the existing nodes.Actually attribute modification requires to have IXMLDOMElement of the node. for new node I can get it through "createElement" method when adding a new node.I want to know how I can get this IXMLNodeElement property for the existing nodes in the XML documant.
 
Old February 14th, 2005, 05:04 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You select a node using the selectNode method and passing an XPath, as a string, such as "/myData/myNode" which selects the element named myNode under the document root element of myData. You can also select the atribute directly, if myNode had an attribute named myAtt then "/myData/myNode/@myAtt" ould select it. Suggest you read the examples that came with msxml 4 parser.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying attributes of a VB.NET object ziemniakc ASP.NET 1.0 and 1.1 Professional 0 June 19th, 2007 01:17 PM
modifying existing DTS for similar purpose QTR SQL Server DTS 1 April 23rd, 2007 11:04 AM
selecting nodes that lack certain attributes rmers XSLT 3 October 4th, 2006 03:44 PM
Adding existing and non-existing attributes spencer.clark XSLT 5 July 27th, 2005 04:02 PM
Need to copy all nodes, attributes, and namespaces juaniux XSLT 4 October 22nd, 2004 04:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.