Click here to Skip to main content
15,891,529 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: How to give a unique id like that 15b85c2b-83ca-44ec-8741-22a4dc64f64d in using c# Pin
Vishnu Narayan Mishra14-Nov-07 22:23
Vishnu Narayan Mishra14-Nov-07 22:23 
Questionhow to fetch child nodes of parent node in XML .. using c#... Pin
Vishnu Narayan Mishra14-Nov-07 2:03
Vishnu Narayan Mishra14-Nov-07 2:03 
AnswerRe: how to fetch child nodes of parent node in XML .. using c#... Pin
led mike14-Nov-07 5:02
led mike14-Nov-07 5:02 
GeneralRe: how to fetch child nodes of parent node in XML .. using c#... Pin
Vishnu Narayan Mishra19-Nov-07 20:03
Vishnu Narayan Mishra19-Nov-07 20:03 
GeneralRe: how to fetch child nodes of parent node in XML .. using c#... Pin
led mike20-Nov-07 5:39
led mike20-Nov-07 5:39 
Questionhow can we go through such kinds of tag in xml like <PopupHTML /> Pin
Vishnu Narayan Mishra13-Nov-07 23:17
Vishnu Narayan Mishra13-Nov-07 23:17 
AnswerRe: how can we go through such kinds of tag in xml like Pin
George L. Jackson14-Nov-07 1:53
George L. Jackson14-Nov-07 1:53 
QuestionHow to delete a xml node with all attributes and start, end tag of the xml node in c#-- urgent Pin
Vishnu Narayan Mishra13-Nov-07 2:17
Vishnu Narayan Mishra13-Nov-07 2:17 
Hello every one! I have a little problem of deleting xml node. I have deleted successfully the

attributes of node <ScreenSupportItem> but opening and closing tag of node was not deleted

<ScreenSupportItem> and </ScreenSupportItem>.
But i have to delete also the opening and clsing tag ofthe node <ScreenSupportItem> means I have to

remove every thing of <ScreenSupportItem>.How can I do this.

following is the structure of my xml file
--------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<LinkInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<LinkToolId>0</LinkToolId>
<LinkToolVersion>1.0.1</LinkToolVersion>
<ScreensToSupport>
<ScreenToSupport>
<ScreenUniqueId>c1f13323-209b-4b0e-ad8d-d34f64d34c28</ScreenUniqueId>
<SupportItems>
<ScreenSupportItem>
<LinkDate>2007-10-25T11:47:10.515625+05:30</LinkDate>
<LinkAuthor>SUBHASH\Login Subhash</LinkAuthor>
<LinkURL>C:\Documents and Settings\Login Subhash\Desktop\main.html</LinkURL>
<LinkText>Adding New Html Help</LinkText>
<OptionalSupportInstruction />
<RefId>3</RefId>
</ScreenSupportItem>
<ScreenSupportItem>
...
</ScreenSupportItem>
<ScreenSupportItem>
....
</ScreenSupportItem>
</SupportItems>
</ScreensToSupport>
</LinkInformation>
--------------------------------------------------------
following is my c# code
--------------------------------------------------------
//int intRefId = Convert.ToInt32(Request.QueryString["RefId"]);
int intRefId = 3;
string strXPath =

"/LinkInformation/ScreensToSupport/ScreenToSupport/SupportItems/ScreenSupportItem[RefId='" +

intRefId + "']";

XmlNode newParent = doc.SelectSingleNode(strXPath);
XmlNodeList newChildNodeList = newParent.ParentNode.ChildNodes;
foreach (XmlNode node1 in newChildNodeList)
{
foreach (XmlNode node in node1)
{
if (node.Name == "LinkURL" && node.InnerText == hdntxtUrlLink.Text)
{
intCount++;
}
if (node.Name == "LinkText" && node.InnerText == hdntxtUrlTitle.Text)
{
intCount++;
}
}
if (intCount == 2)
{
node1.RemoveAll();// This line deleted successfully the node but it left

start and end tag of the node <ScreenSupportItem> and </ScreenSupportItem>
lblError.Text = "Deleted successfully !";
break;
}
}
doc.Save(strXMLFile);
--------------------------------------------------------
please reply me soon.
Thanks in advance..
Vishnu
AnswerRe: How to delete a xml node with all attributes and start, end tag of the xml node in c#-- urgent Pin
led mike13-Nov-07 6:18
led mike13-Nov-07 6:18 
GeneralRe: How to delete a xml node with all attributes and start, end tag of the xml node in c#-- urgent Pin
Vishnu Narayan Mishra13-Nov-07 22:24
Vishnu Narayan Mishra13-Nov-07 22:24 
QuestionHow can I go through all child nodes and attributes of child nodes of a parent node.. Pin
Vishnu Narayan Mishra12-Nov-07 22:22
Vishnu Narayan Mishra12-Nov-07 22:22 
QuestionHow can I go through all child nodes and attributes of child nodes of a parent node.. [modified] Pin
Vishnu Narayan Mishra12-Nov-07 21:14
Vishnu Narayan Mishra12-Nov-07 21:14 
QuestionEdititng the tag of XML Pin
SreejithAchutan8-Nov-07 17:04
SreejithAchutan8-Nov-07 17:04 
AnswerRe: Edititng the tag of XML Pin
led mike9-Nov-07 5:19
led mike9-Nov-07 5:19 
Questionhow to append node with attributes after an node in XML + C# [modified] Pin
Vishnu Narayan Mishra7-Nov-07 20:52
Vishnu Narayan Mishra7-Nov-07 20:52 
AnswerRe: how to append node with attributes after an node in XML + C# Pin
pmarfleet8-Nov-07 9:51
pmarfleet8-Nov-07 9:51 
QuestionSending XML Soap Messages, C# Pin
AssemblySoft5-Nov-07 6:18
AssemblySoft5-Nov-07 6:18 
AnswerDouble post Pin
pmarfleet5-Nov-07 6:54
pmarfleet5-Nov-07 6:54 
QuestionXML problems Pin
kurt194-Nov-07 23:31
kurt194-Nov-07 23:31 
AnswerRe: XML problems Pin
led mike5-Nov-07 7:21
led mike5-Nov-07 7:21 
GeneralRe: XML problems Pin
kurt195-Nov-07 13:56
kurt195-Nov-07 13:56 
GeneralRe: XML problems Pin
George L. Jackson5-Nov-07 14:41
George L. Jackson5-Nov-07 14:41 
GeneralRe: XML problems Pin
kurt195-Nov-07 15:36
kurt195-Nov-07 15:36 
AnswerRe: XML problems Pin
George L. Jackson6-Nov-07 2:06
George L. Jackson6-Nov-07 2:06 
GeneralRe: XML problems Pin
kurt196-Nov-07 19:53
kurt196-Nov-07 19:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.