|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: On the promotion and demotion of information items (was Re
using System;
using System.Xml;
public class Test{
public static void Main(string[] args){
XmlDocument doc = new XmlDocument();
doc.Load("config.xml");
XmlNode curr = doc.SelectSingleNode("//comment()[contains(.,'Start xxxx.Net')]");
XmlNode parent = curr.ParentNode, deleted;
do{
deleted = curr;
curr = curr.NextSibling;
parent.RemoveChild(deleted);
}while((deleted.NodeType != XmlNodeType.Comment) ||
(!deleted.Value.Equals(" End xxxx.Net ")));
Console.WriteLine(doc.OuterXml);
}
}
________________________________
From: Bill de hÓra [mailto:bill@d...]
Sent: Thu 3/6/2003 5:04 AM
To: Dare Obasanjo
Cc: Alaric B. Snell; Rick Jelliffe; xml-dev@l...
Subject: Re: On the promotion and demotion of information items (was Re: RE: Take 2 - How do you replace comments from XML?)
Like I said, if you have useful advice on processing this file, I'm
sure the OP would like to hear it (I certainly would).
Bill de hÓra
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








