OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] RE: Take 2 - How do you replace comments from XML?

[ Lists Home | Date Index | Thread Index ]


> Well assuming he knows what block he wants to remove he can place 
> the machine.config file in a DOM, XPath to the node that he wants 
> to remove & replace it. If he also wants to delete the preceding 
> node if it is a comment he can simply check if its preceding 
> sibling is a comment (and examine its text if necessary) then 
> remove it as well. 

The first assumption is the problem.

<appSettings>
	<!-- settings related to X -->
		<add key="a" value="1"/>
		<add key="b" value="2"/>
	<!-- settings related to Y -->
		<add key="c" value="3"/>
		<add key="d" value="4"/>
</appSettings>
 





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS