|
Sir, can you give me any solution to how can i do this. I will very thankful to you..
|
|
|
|
|
Have you looked at the examples I suggested? Have you attempted to solve the problem yourself? Seriously, if you can't be bothered to help yourself then I can't give you any further advice.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I have a little query of generting unique id for creating node ,
Is there is any way to generate random no ...
I have to genarate a random no for FieldUniqueId attribute in the
<FieldToSupport> each time when I create a new node
<FieldToSupport>..
I tried it by using Session.SessionID but the no string genarated
for example 'hzskur45zxzh4jiwq5lsp3j3' this is same during for
the logged user .... also i have to generate random no string in
the format like '15b85c2b-83ca-44ec-8741-22a4dc64f64d' ..
following is the strucuture of XML file
<FieldsToSupport>
<FieldToSupport>
<Caption>Blank</Caption>
<Url>Blank</Url>
<Label>NewField1</Label>
<HtmlName />
<HtmlId />
<FieldUniqueId>15b85c2b-83ca-44ec-8741-22a4dc64f64d</FieldUniqueId>
<LinkHref>http://careers.msn.com/</LinkHref>
<InnerHTML>Careers &amp; Jobs</InnerHTML>
<OuterHTML><A href="http://careers.msn.com">Careers &amp;
Jobs</A></OuterHTML>
<PopupHTML />
<FieldSupportItems />
</FieldToSupport>
<FieldToSupport>
......
</FieldToSupport>
<FieldToSupport>
......
</FieldToSupport>
</FieldsToSupport>
|
|
|
|
|
I got the answer..there is a method in System namespace called Guid().
we can use it as
string newID = Guid.NewGuid().ToString();
its genarate every time a uniue Id according to my requirement..
Thanks
|
|
|
|
|
hello every one... I am tried to retrieve a node FieldsToSupport/FieldToSuport in a xml..
Following is the structure of my xml file.....there can be multiple <FieldToSuport> into
<FieldsToSupport> in a <ScreenToSupport>. Also <ScreenToSupport> can be multiple..
------------------------------------------------------------
<?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>e7dfee93-14f0-4775-baef-c7246dfae902</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\iframeCopy.html</LinkURL>
<LinkText>Updating Adding New Row</LinkText>
<OptionalSupportInstruction />
<RefId>3</RefId>
</ScreenSupportItem>
</SupportItems>
<FieldsToSupport>
<FieldToSupport>
<Caption>Blank</Caption>
<Url>Blank</Url>
<Label>NewField1</Label>
<HtmlName />
<HtmlId />
<FieldUniqueId>15b85c2b-83ca-44ec-8741-22a4dc64f64d</FieldUniqueId>
<LinkHref>http://careers.msn.com/</LinkHref>
<InnerHTML>Careers &amp; Jobs</InnerHTML>
<OuterHTML><A href="http://careers.msn.com">Careers &amp;
Jobs</A></OuterHTML>
<PopupHTML />
<FieldSupportItems />
</FieldToSupport>
<FieldToSupport>
<Caption>Blank</Caption>
<Url>Blank</Url>
<Label>Screen2</Label>
<HtmlName />
<HtmlId />
<FieldUniqueId>97d5c477-a5f4-4496-8084-19a537d85e29</FieldUniqueId>
<LinkHref>http://slate.com/</LinkHref>
<InnerHTML>Slate Magazine</InnerHTML>
<OuterHTML><A href="http://slate.com">Slate Magazine</A></OuterHTML>
<PopupHTML />
<FieldSupportItems />
</FieldToSupport>
</FieldsToSupport>
<Label>label3</Label>
<ScreenMatchProbabilityLevel>172.0934</ScreenMatchProbabilityLevel>
</ScreenToSupport>
</ScreensToSupport>
</LinkInformation>
------------------------------------------------------------
and following is my code in c#. I am try to fetch node <ScreenToSupport> by its ScreenUniqueId
attribute..
string strScreenId = Convert.ToInt32(Request.QueryString["ScreenId"]);
string strXPath =
"/LinkInformation/ScreensToSupport/ScreenToSupport/[ScreenUniqueId='"+strScreenId+"']";
XmlNode newParent = doc.SelectSingleNode(strXPath);
------------------------------------------------------------
but it giving error "Expression must evaluate to a node-set." new parent comming null here..
------------------------------------------------------------
after that I have to fetch corressponding
"FieldsToSupport/FieldToSupport[FieldUniqueId='"+strFieldId+"']" of <ScreenToSupport> node..
How can fecth FieldsToSupport/FieldToSupport need help any ones..
Please reply me soon sir. I will very thankful for th
|
|
|
|
|
Well I have some suggestions for you.
First I recommend, it's what I use, www.w3schools.com as an excellent reference for things like XPath etc.
Second, find yourself a method of testing XPath statements before you try to integrate them into code. I mean you just type a statement and execute it in some environment to see that you obtain the node or node set desired. There might be something you can get for free and it's not that difficult to write a little command line utility or even a Windows Forms application for testing XPath statements.
Lastly, when you want to create a paramaterized XPath statement don't use string concatination, use String.Format(...) with format strings that have placeholders for the parameters. It's far simpler to get the XPath statement syntax correct when you do that. Let's use your statement as an example:
"/LinkInformation/ScreensToSupport/ScreenToSupport/[ScreenUniqueId='"+strScreenId+"']";<br />
The format string would be:
"/LinkInformation/ScreensToSupport/ScreenToSupport/[ScreenUniqueId='{0}']";
then use it in String.Format and pass the parameter to fill in the placeholder.
Now to your problem. You XPath statement syntax is incorrect, there should be no path separator before the expression
ScreenToSupport/[ScreenUniqueId
should be
<br />
ScreenToSupport[ScreenUniqueId
|
|
|
|
|
hello sir
the way you tried to explain me is excellent..
But I am did'nt get you point 'then use it in String.Format and pass the parameter to fill in the placeholder.'
How we pass parameter into String.Format pls tell m?
Thanks a lot
|
|
|
|
|
Vishnu Narayan Mishra wrote: How we pass parameter into String.Format pls tell m?
I don't think I understand your question. You have read the documentation[^] yes?
|
|
|
|
|
hello every one...
can you help me to sort out a little problem of xml?
how can we go through such kinds of tag in xml like <PopupHTML />
and make it complete pair tag like that <PopupHTML> </PopupHTML> using c#
this is the sample structure of my XML file...
please reply me soon sir thank you...
--------------------------------------------------------------
<FieldsToSupport>
<FieldToSupport>
<Caption>Blank</Caption>
<Url>Blank</Url>
<Label>NewField1</Label>
<HtmlName />
<HtmlId />
<FieldUniqueId>15b85c2b-83ca-44ec-8741-22a4dc64f64d</FieldUniqueId>
<LinkHref>http://careers.msn.com/</LinkHref>
<InnerHTML>Careers &amp; Jobs</InnerHTML>
<OuterHTML><A href="http://careers.msn.com">Careers &amp; Jobs</A></OuterHTML>
<PopupHTML />
<FieldSupportItems />
</FieldToSupport>
<FieldToSupport>
...
</FieldToSupport>
<FieldToSupport>
...
</FieldToSupport>
<FieldToSupport>
...
</FieldToSupport>
<FieldsToSupport>
--------------------------------------------------------------
|
|
|
|
|
You need to read the documentation, and there are a lot of examples available on Code Project and the rest of the internet. Anyways, here is an example:
using System;
using System.Xml;
namespace XmlExample
{
class Program
{
static void Main(string[] args)
{
string xml =
"<?xml version='1.0'?>\n"
+ "<nodes>\n"
+ "\t<node/>\n"
+ "</nodes>\n";
XmlDocument xml_doc = new XmlDocument();
xml_doc.PreserveWhitespace = true;
xml_doc.LoadXml(xml);
XmlNode node = xml_doc.SelectSingleNode("//nodes/node");
if (node != null)
{
XmlText text = xml_doc.CreateTextNode("Hello, World!");
node.AppendChild(text);
}
Console.WriteLine(xml_doc.InnerXml);
}
}
}
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
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
|
|
|
|
|
Use an XPath statement to find the node you want to remove then call
node.ParentNode.RemoveChild(node)<br />
<br />
XmlNode node = doc.SelectSingleNode("//x/y/z/ScreenSupportItem");
node.ParentNode.RemoveChild(node);
|
|
|
|
|
Thanks a lot sir, its working fine....
|
|
|
|
|
Hello sir
There is a little problem of xml again.
How can I go through all child nodes and attributes of child nodes of a parent node..
Suppose i have to go through all child nodes e.g.<ScreenSupportItem> of parent nodes
e.g.<SupportItems>. There can be mutiple <ScreenSupportItem> in a parent node <SupportItems>. I have
to check values of <LinkURL> and <LinkText> of all child nodes <ScreenSupportItem> and if it matches
with the supplied valus it gives a message 'LinkUrl/LinkText already exist' else insert new
<ScreenSupportItem> of <ScreenSupportItem> and set all attributes of <ScreenSupportItem> , which was
supplied by the user.
My code check only first child <ScreenSupportItem> of <SupportItems> if it values matches for
<LinkURL> and <LinkText> give a proper message else insert new <ScreenSupportItem>.
So how can I check all child <ScreenSupportItem> for values <LinkURL> and <LinkText> of
<SupportItems>
This is a sample struture 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>
<LinkDate>2007-11-13T12:48:29.9687500+05:30</LinkDate>
<LinkAuthor>SUBHASH\vishnu</LinkAuthor>
<LinkURL>C:\Documents and Settings\Login Subhash\Desktop\iframe.html</LinkURL>
<LinkText>HTML Help File</LinkText>
<OptionalSupportInstruction />
<RefId>3</RefId>
</ScreenToSupport>
<ScreenToSupport>
<LinkDate>2007-11-13T13:04:40.2656250+05:30</LinkDate>
<LinkAuthor>SUBHASH\vishnu</LinkAuthor>
<LinkURL>C:\Documents and Settings\Login Subhash\Desktop\main.html</LinkURL>
<LinkText>Adding new Help Link</LinkText>
<OptionalSupportInstruction />
<RefId>3</RefId>
</ScreensToSupport>
<ScreenToSupport>
<LinkDate>2007-11-13T13:04:24.8437500+05:30</LinkDate>
<LinkAuthor>SUBHASH\vishnu</LinkAuthor>
<LinkURL>C:\Documents and Settings\Login Subhash\Desktop\iframeCopy.html</LinkURL>
<LinkText>New Link Help</LinkText>
<OptionalSupportInstruction />
<RefId>3</RefId>
</ScreensToSupport>
<ScreenToSupport>
.....
</ScreenToSupport>
</ScreensToSupport>
</LinkInformation>
----------------------------------------------------------------
follwing is my code..
please reply me soon sir .. i will very thankful for that..
----------------------------------------------------------------
if (strAlbumName != "" && strAlbumPath != "")
{
strXMLFile = strAlbumPath + "\\" + strAlbumName + ".linkinfo.xml";
XmlDocument doc = new XmlDocument();
doc.Load(strXMLFile);
System.Data.DataSet objDataSet = new DataSet();
FileStream findata = new FileStream(strXMLFile, FileMode.Open, FileAccess.Read,
FileShare.ReadWrite);
objDataSet.ReadXml(findata);
findata.Close();
//int intRefId = Convert.ToInt32(Request.QueryString["RefId"]);
int intRefId = 3;
string strFilePath = FileUpload.PostedFile.FileName;
string strXPath =
"/LinkInformation/ScreensToSupport/ScreenToSupport/SupportItems/ScreenSupportItem[RefId='" +
intRefId + "']";
XmlNode newParent =
doc.SelectSingleNode(strXPath);//.ParentNode.NextSibling.ChildNodes;
foreach (XmlNode node in newParent)
{
if (node.Name == "LinkURL")
{
if (node.InnerText == FileUpload.PostedFile.FileName)
{
BaydonConstants.flag = true;
break;
}
}
else if (node.Name == "LinkText")
{
if (node.InnerText == txtUrlTitle.Text)
{
BaydonConstants.flag = true;
break;
}
}
}
if (BaydonConstants.flag == true)
{
lblError.Text = "LinkUrl/LinkText already exist !";
BaydonConstants.flag = false;
}
else
{
string strMachineName = System.Environment.MachineName + "\\";
XmlNode newRootParent = doc.SelectSingleNode(strXPath).ParentNode;
int intNodeCount = newRootParent.ChildNodes.Count;
if (intNodeCount == 1 && (newParent["LinkURL"].InnerText.ToString() == "" &&
newParent["LinkText"].InnerText.ToString() == ""))
{
newParent["LinkDate"].InnerText = DateTime.Now.ToString("o");
newParent["LinkAuthor"].InnerText = strMachineName +
Session["UserId"].ToString();
newParent["LinkURL"].InnerText = FileUpload.PostedFile.FileName;
newParent["LinkText"].InnerText = txtUrlTitle.Text;
lblError.Text = "Inserted successfully !";
}
else
{
XmlNode newScreenToSupport = newParent.Clone();
newScreenToSupport["LinkDate"].InnerText = DateTime.Now.ToString("o");
newScreenToSupport["LinkAuthor"].InnerText = strMachineName +
Session["UserId"].ToString();
newScreenToSupport["LinkURL"].InnerText = FileUpload.PostedFile.FileName;
newScreenToSupport["LinkText"].InnerText = txtUrlTitle.Text;
newRootParent.InsertBefore(newScreenToSupport, newParent);
lblError.Text = "Inserted successfully !";
}
doc.Save(strXMLFile);
}
}
}
----------------------------------------------------------------
Vishnu Narayan
|
|
|
|
|
Hello every one..
There is a little problem of xml..?
How can I go through all child nodes and attributes of child nodes of a parent node..
Suppose i have to go through all child nodes e.g.<ScreenSupportItem> of parent nodes e.g.<SupportItems>. There can be mutiple <ScreenSupportItem> in a parent node <SupportItems>. I have to check values of <LinkURL> and <LinkText> of all child nodes <ScreenSupportItem> and if it matches with the supplied valus it gives a message 'LinkUrl/LinkText already exist' else insert new
<ScreenSupportItem> of <ScreenSupportItem> and set all attributes of <ScreenSupportItem> , which was supplied by the user.
My code check only first child <ScreenSupportItem> of <SupportItems> if it values matches for <LinkURL> and <LinkText> give a proper message else insert new <ScreenSupportItem>. So how can I check all child <ScreenSupportItem> for values <LinkURL> and <LinkText> of <SupportItems>
This is a sample struture 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>
<LinkDate>2007-11-13T12:48:29.9687500+05:30</LinkDate>
<LinkAuthor>SUBHASH\vishnu</LinkAuthor>
<LinkURL>C:\Documents and Settings\Login Subhash\Desktop\iframe.html</LinkURL>
<LinkText>HTML Help File</LinkText>
<OptionalSupportInstruction />
<RefId>3</RefId>
</ScreenToSupport>
<ScreenToSupport>
<LinkDate>2007-11-13T13:04:40.2656250+05:30</LinkDate>
<LinkAuthor>SUBHASH\vishnu</LinkAuthor>
<LinkURL>C:\Documents and Settings\Login Subhash\Desktop\main.html</LinkURL>
<LinkText>Adding new Help Link</LinkText>
<OptionalSupportInstruction />
<RefId>3</RefId> //can be same for two or more childs
</ScreensToSupport>
<ScreenToSupport>
....
</ScreensToSupport>
<ScreenToSupport>
.....
</ScreenToSupport>
</ScreensToSupport>
</LinkInformation>
-----------------------------
following is my code..
please reply me soon sir .. i will very thankful for that..
-----------------------------
int intRefId = Convert.ToInt32(Request.QueryString["RefId"]);
string strFilePath = FileUpload.PostedFile.FileName;
string strXPath =
"/LinkInformation/ScreensToSupport/ScreenToSupport/SupportItems/ScreenSupportItem[RefId='" + intRefId + "']";
XmlNode newParent =
doc.SelectSingleNode(strXPath);//.ParentNode.NextSibling.ChildNodes;
foreach (XmlNode node in newParent)
{
if (node.Name == "LinkURL")
{
if (node.InnerText == FileUpload.PostedFile.FileName)
{
BaydonConstants.flag = true;
break;
}
}
else if (node.Name == "LinkText")
{
if (node.InnerText == txtUrlTitle.Text)
{
BaydonConstants.flag = true;
break;
}
}
}
if (BaydonConstants.flag == true)
{
lblError.Text = "LinkUrl/LinkText already exist !";
BaydonConstants.flag = false;
}
else
{
//insert new <ScreenSupportItem>...
doc.Save(strXMLFile);
}
}
}
-------------------------------
-- modified at 3:28 Tuesday 13th November, 2007
|
|
|
|
|
<?xml version="1.0"?>
<configuration>
<appSettings />
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" />
<roleManager enabled="true" />
<authentication mode="Forms">
<forms loginUrl="Login.aspx" path="/" defaultUrl="Default.aspx" cookieless="UseDeviceProfile">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
<location path="UnauthorizedAccess.aspx">
<system.web>
<authorization>
<allow roles="Administrator" />
<deny users="*" />
</authorization>
</system.web>
</location>
<location path="Admin">
<system.web>
<authorization>
<allow roles="Manager" />
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>
How we select dynamically the location tag from a web.config if we have 2 0r 3 location tag is avilable.In the above webconfig file we have 2 location tag.I want to change the path of the location tag dynamically.Please help to overcome this problem.
|
|
|
|
|
Try the XML tutorial at www.w3schools.com
|
|
|
|
|
hello every one I am tried to update an XML file but its not working according to my requirement. I have to create a new child node <screensupportitem> below the parent node <supportitems> with matching condition --where attribute of <screensupportitem> e.g <refid> is equal to 3 (comes from query string). Also new <screensupportitem> child have different attributes except <refid>. So I have to create a <screensupportitem> with setting new values of all the attributes.
This is the structure of XML file
-----------------------------------------------------------------
<screenstosupport>
<screentosupport>
........all have same structure <screentosupport>
<screentosupport>
<screenuniqueid>c1f13323-209b-4b0e-ad8d-d34f64d34c28
<supportitems>
<linkurl>C:\Documents and Settings\Login Subhash\Desktop\iframe.html
<linktext>New Link Help
<screensupportitem>
<linkdate>2007-10-25T11:47:10.515625+05:30
<linkauthor>SUBHASH\Login Subhash
<linkurl>C:\Documents and Settings\Login Subhash\Desktop\main.html
<linktext>Adding New Html Help
<optionalsupportinstruction>
<refid>3
<fieldstosupport>
<linkurl>C:\Documents and Settings\Login Subhash\Desktop\iframe.html
<linktext>New Link Help
<screentosupport>
........all have same structure <screentosupport>
And this is my sample code
-----------------------------------------------------------------
strXMLFile = strAlbumPath + "\\" + strAlbumName + ".linkinfo.xml";
XmlDocument doc = new XmlDocument();
doc.Load(strXMLFile);
FileStream findata = new FileStream(strXMLFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
objDataSet.ReadXml(findata);
findata.Close();
//int intRefId = Convert.ToInt32(Request.QueryString["RefId"]);
int intRefId = 3;
string strFilePath = FileUpload.PostedFile.FileName;
string strXPath = "/LinkInformation/ScreensToSupport/ScreenToSupport/SupportItems/ScreenSupportItem[RefId='" + intRefId + "']";
XmlNode newParent = doc.SelectSingleNode(strXPath);//.ParentNode.NextSibling.ChildNodes;
XmlNode newRootParent = doc.SelectSingleNode(strXPath).ParentNode;
XmlNode newScreenToSupport = newParent.Clone();
newRootParent.InsertAfter(newRootParent, newScreenToSupport);
doc.Save(strXMLFile);
-----------------------------------------------------------------
It giving error 'ERROR:Cannot insert a node or any ancestor of that node as a child of itself.'
I am very new in xml please help me to solved my problem. I will very thankful for your valuable cooperation.
Please reply me soon....
|
|
|
|
|
Vishnu Narayan Mishra wrote: newRootParent.InsertAfter(newRootParent, newScreenToSupport);
As the error message explains, you are adding a node as a child of itself here. Read the MSDN documentation[^] on this method if you are unsure how to use it.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
am writing an app that uses the .Net classes TCPClient and NetworkStream to read and write data between 2 machines. All works fine.
I have recently found a need to be able to send Http 1.1 with a SOAP message as the Http body. Currently i am using an XmlDocument to load and parse the SOAP data. However to do this i first have to read in the HTTP header, search for the beginning of the body and construct my own XmlDocument.
There must be a better way. I don't want to call a web service, i just want to send http with a soap body and receive the same.
I am looking for a means of loading in the NetworkStream into some kind of HTTP object to read the http stuff and also load the body into some simple Soap object that can be used to pull out/ set values.
Comments, Suggestions Welcomed.
Carl
|
|
|
|
|
Please don't double post.
Choose the most appropriate forum for your question and ask there only.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi everyone,
Im a newbie in xml, anyone could help to resolve my problem?
I have one xml file and i was able to fill my two datagrid (grdColor and grdSize) using my PO.xml data.Now, my problem is i would like to filter my data in grdSize depending to the data in the grdColor.Like for example, in the grdColor i have two rows, the first row has a ColorID: 1 and the second row is ColorID:2, now , when the mouse cursor pointing to the first row which ColorID is 1 in grdSize it only appear thus data that has ColorID:1.
Thanks in advance.
try and try until you success..
|
|
|
|
|
kurt19 wrote: I have one xml file and i was able to fill my two datagrid (grdColor and grdSize) using my PO.xml data.
Ummm..... how?
|
|
|
|
|
that's my problem right now. Hope someone can help me this problem.
try and try until you success..
|
|
|
|
|
It appears you are not having a problem with XML but with an ASP.NET Datagrid.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|