|
I have 8000 records i want put server side pagination and search
|
|
|
|
|
|
|
Hi Ann - welcome to the site!
Unfortunately, "teach me some of your knowledge" isn't really something we can do in a little text box - we have no idea what you do or don't know and understand, and the last thing we want to do is send you off in a direction that your course isn't taking yet. And I'm sure you are already aware that there isn't "one way to do it" but pretty much as many different ways as there are developers to try it!
So you need to be rather more specific about exactly what you are trying to do, what you have tried, what happened when you tried, where you are stuck, and what help you need! I know, I know - that sounds like a lot, but we can't see your screen, access your HDD, or read your mind: we only get exactly what you type to work with. And when you post the computer equivalent of phoning the garage, saying "it broke" and ending the call we get nothing to really work with!
So think about what you are having difficulty with and try explaining in good detail - the better your questions, the better our answers!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
|
Thanks; is the beer in the post?
|
|
|
|
|
how can I implement the cd funtion?
|
|
|
|
|
If you're using the FtpWebRequest class, you have to "fake" it by adding the directory to the URL:
Changing to the root directory with FtpWebRequest – Mariya Atanasova's Blog[^]
If you're using something else, then you'll need to tell us what you're using, as the answer will likely be different for each FTP client library.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I want to make a windows notifyicon program that automatically returns answers to a question that i copied in c# winforms. How can i make that?
|
|
|
|
|
What have you tried?
Where are you stuck?
What help do you need?
This is not a good question: we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Teun van den Broek wrote: How can i make that? By writing a lot of code. I'm not really sure what kind of answer you are looking for.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
If you have to ask, "How do I write an entire program?", you've got a much bigger problem with your skill set. You need to break the application down into smaller and smaller solvable chunks.
You said you have to display a notify icon. OK, so do you know how to display a notify icon on the Task Bar?
Do you know how to interact with the notify icon when someone clicks on it?
Know how to handle a dialog and text box?
No? You've got a lot of research to do.
|
|
|
|
|
Can any one help me find differences between 2 XML files?
I have tried the XMLDiff but the problem is that i want the differences which are in the vxd.out file(Generated as a intermediate file and later gets deleted) to be with Node names instead of numbers.
The node names are not fixed it keeps changing (based on check box it gets added or removed(Eg)). The output of xmlDiff seems to be ok (since find some issues in it - "can live with it") need numbers converted to names where name can be fetched from on of the file when reloaded after the vxd.out file. I can trace down the numbers but the issue is cant convert to names.
The XML file size talking about is 60mb file may grow.
IF ANY OTHER WAY OF COMPARISON WHICH WORKS IS THERE WOULD ALSO BE FINE. i WANT ONLY THE DIFFERENCES IN SEPARATE FILE.
Thank for your help in advance.
|
|
|
|
|
Personally I use Beyond Compare[^] - you can get a 30 day trial to work out if it's good enough for what you need.
|
|
|
|
|
Thank you for the response.
Yes, but most of the time its like if the 1 element or 1 node is moved to 10th element of the node it does not help much. More over they only want the changes to see in separate document. Like added node name, modified node name, deleted node name etc...
|
|
|
|
|
Rather than looking for a cute way to do it in xml why not read the data into a structure and then manipulate it there.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Reading it as a DOM tree and recursively finding the complement of each set of child nodes maybe? Since I think it's implied that the order of elements isn't significant.
|
|
|
|
|
What has this question got to do with C#?
This space for rent
|
|
|
|
|
I want a code in c# for comparing 2 xml files that's the reason for posting in this area.
Since its a code is required in c# it has been posted here... any clarifications required?
|
|
|
|
|
First, you didn't ask for any code (C# or otherwise), you just posted a request to compare files. Second, what code do you currently have? Are you using XLINQ or XMLDocument manipulation?
This space for rent
|
|
|
|
|
I am using XMLDocument as of now. Not much aware of LINQ. The problem with XMLDocument or XDoc we can have a look at the immediate child and immediate parent on reaching the specific node.
Looking for code in c# for comparing the XML.
Problems faced with input file:
* dont have the pattern/Schema of the xml aslo how it would look finally if all options enabled.
* node names are not fixed (eg: 10 checkbox exist when xml file generated, only selected 2 items in check box so xml generated only with those 2. Later on add 2 more checkbox enabled where in new xml will have 4 out of 10 check box. When compare we can check for only old check boxes which have the node names. for the new ones we will come to know node names and we need to alter code for the 2 new selection)
* Some cases node has not attribute but has child's.
* Some other time nodes have same name but no attribute and has child and would be in same position as the other.
* I had used diffpatch from microsoft to get differences but intermediate output is in node numbers want to convert it to numbers. (If any other solution for comparing and get differences only in different file is most welcome)
|
|
|
|
|
Any updates on the query?
|
|
|
|
|
No. You haven't shown us any of your code here so we can't begin to help you. This isn't a code for hire service.
This space for rent
|
|
|
|
|
public void ReadXmlNodes1(System.Xml.XmlNodeList nodeList, string fst)
{
string PrefixValue = string.Empty;
foreach (System.Xml.XmlNode n in nodeList)
{
{
if (LoopReturn == 1)
{
Diffnum = Positivenum - Negativenum;
if (Diffnum < 0)
{ Diffnum = 0; }
string[] fullXmlPathSplit = fullXmlPath.Split(',');
PrefixValue = string.Join(",", fullXmlPathSplit, 0, Diffnum);
iAppend = iAppend + 1;
if (Diffnum == 0)
{ Positivenum = 0; Negativenum = 0; fullXmlPath = string.Empty; iAppend = 0; }
else
{ Positivenum = Positivenum - 1; }
LoopReturn = 3; // if the loop is revising the same node tree.
}
if (fst != "First")
{
Positivenum = Positivenum + 1;
fst = "Sec";
}
if (n.ChildNodes.Count == 0)
{
if (n.InnerText != string.Empty || n.InnerText != "" || NodeTraverse != "" || NodeTraverse != string.Empty)
{
if (n.LocalName == "remove")
{
string[] tmpOuter = n.OuterXml.ToString().Split(' ');
tmpOuter = tmpOuter[1].ToString().Split('=');
string[] tmpremoveOuter = tmpOuter[1].Split('"');
if (tmpremoveOuter[1].Contains("-") || NodeTraverse != string.Empty)
{
if (tmpremoveOuter[1].Contains("-") == false)
{ NodeTraverse = NodeTraverse + "," + tmpremoveOuter[1] + " - " + n.LocalName + " = " + tmpOuter[1].ToString(); }
else
{ NodeTraverse = NodeTraverse + " - " + n.LocalName + " = " + tmpOuter[1].ToString(); }
}
else
{ NodeTraverse = NodeTraverse + "," + tmpremoveOuter[1] + " - " + n.LocalName + " = " + tmpOuter[1].ToString(); }
//Remove
if (LoopReturn == 1)
{ NodeTraverse = PrefixValue + NodeTraverse + Environment.NewLine; }
else
{ NodeTraverse = NodeTraverse + Environment.NewLine; }
File.AppendAllText(Diff_NodeNum, NodeTraverse);
NodeTraverse = "";
Positivenum = Positivenum - 1;
}
else
{
NodeTraverse = NodeTraverse + " - " + n.ParentNode.LocalName + " - " + n.InnerText;
//Final Line write
if (LoopReturn == 1)
{ NodeTraverse = PrefixValue + NodeTraverse + Environment.NewLine; }
else
{ NodeTraverse = NodeTraverse + Environment.NewLine; }
File.AppendAllText(Diff_NodeNum, NodeTraverse);
NodeTraverse = "";
Positivenum = Positivenum - 1;
}
}
else
{
string[] tmpOuter1 = n.OuterXml.ToString().Split(' ');
string[] tmpremoveOuter1 = tmpOuter1[1].Split('"');
if (tmpremoveOuter1[1] != string.Empty)
{
if (tmpremoveOuter1[1].Contains("-") || NodeTraverse != string.Empty)
{ NodeTraverse = tmpremoveOuter1[1] + " - " + n.LocalName + " - " + tmpOuter1[1].ToString(); }
else
{
if (NodeTraverse == string.Empty && PrefixValue == string.Empty && fullXmlPath == string.Empty)
{ NodeTraverse = tmpremoveOuter1[1] + " - " + n.LocalName + " - " + tmpOuter1[1].ToString(); }
else if (NodeTraverse == string.Empty && PrefixValue == string.Empty)
{ NodeTraverse = fullXmlPath + "," + tmpremoveOuter1[1] + " - " + n.LocalName + " - " + tmpOuter1[1].ToString(); }
else if (PrefixValue != string.Empty)
{ NodeTraverse = PrefixValue + "," + tmpremoveOuter1[1] + " - " + n.LocalName + " - " + tmpOuter1[1].ToString(); }
else
{ NodeTraverse = NodeTraverse + "," + tmpremoveOuter1[1] + " - " + n.LocalName + " - " + tmpOuter1[1].ToString(); }
}
}
else
{ NodeTraverse = NodeTraverse + " - " + n.LocalName + " - " + tmpOuter1[1].ToString(); }
//Write outer text
if (LoopReturn == 1)
{ NodeTraverse = PrefixValue + NodeTraverse + Environment.NewLine; }
else
{
NodeTraverse = NodeTraverse + Environment.NewLine;
}
File.AppendAllText(Diff_NodeNum, NodeTraverse);
NodeTraverse = "";
Positivenum = Positivenum - 1;
}
//LoopReturn = 3; // if the loop is revising the same node tree.
}
else
{
if (n.Attributes.Count > 0)
{
if (n.Attributes[0].Value != string.Empty || n.Attributes[0].Value != "")
{
if (string.IsNullOrEmpty(NodeTraverse) && PrefixValue == string.Empty)
{
NodeTraverse = n.Attributes[0].Value;
}
else if (PrefixValue != string.Empty)
{ NodeTraverse = PrefixValue + "," + n.Attributes[0].Value; }
else
{
NodeTraverse = NodeTraverse + "," + n.Attributes[0].Value;
}
if (LoopReturn != 3)
{ LoopReturn = 2; }
}
}
if (fullXmlPath == string.Empty)
{
if (Positivenum != 0)
if (n.Attributes.Count > 0)
{ fullXmlPath = n.Attributes[0].Value; }
else
{ fullXmlPath = fullXmlPath; }
}
else
{
if (iAppend == 0)
{
if (n.Attributes.Count > 0)
{
fullXmlPath = fullXmlPath + "," + n.Attributes[0].Value;
}
else
{ fullXmlPath = fullXmlPath; }
}
}
ReadXmlNodes1(n.ChildNodes, "Sec");
}
}
}
Negativenum = Negativenum + 1;
LoopReturn = 1;
}
Here is a piece of code from which I am trying to get the node names with numbers. The numbers are generated from diffgram given by microsoft.
The output I am trying to get is the node name and numbers for the changes only in separate file.
XML Output
<xd:xmldiff version="1.0" srcdochash="4699671197287989432" options="IgnoreChildOrder IgnoreComments IgnoreNamespaces IgnorePrefixes IgnoreWhitespace " fragments="yes" xmlns:xd="http://schemas.microsoft.com/xmltools/2002/xmldiff"><xd:node match="3"><xd:node match="4"><xd:node match="2"><xd:remove match="10" subtree="no"><xd:remove match="1" subtree="no"><xd:remove match="1"><xd:remove match="2-8" opid="1"><xd:remove match="2"><xd:node match="12"><xd:node match="1"><xd:node match="1"><xd:change match="1">192.168.2.200<xd:add match="/3/4/2/10/1/2-8" opid="1"><xd:remove match="2-8"><xd:node match="2"><xd:change match="@revision">9<xd:node match="2"><xd:add><hitem revision="9" version="2003" what="SCD Export" when="2018-09-19T06:38:25Z" xmlns="http://www.iec.ch/61850/2003/SCL"><xd:node match="8"><xd:node match="7"><xd:node match="1"><xd:node match="2"><xd:node match="1"><xd:node match="6"><xd:add><fcda doname="TotPF" fc="MX" ldinst="LD0" lnclass="MMXU" lninst="1" prefix="PEAV" xmlns="http://www.iec.ch/61850/2003/SCL"><xd:add><fcda doname="TotVA" fc="MX" ldinst="LD0" lnclass="MMXU" lninst="1" prefix="PEMI" xmlns="http://www.iec.ch/61850/2003/SCL"><xd:node match="4"><xd:remove match="22"><xd:node match="11"><xd:change match="@confRev">200<xd:node match="12"><xd:change match="@confRev">200<xd:remove match="6" subtree="no"><xd:remove match="7" subtree="no"><xd:remove match="1" subtree="no"><xd:remove match="1|4"><xd:remove match="2" subtree="no"><xd:remove match="16"><xd:remove match="3" subtree="no"><xd:remove match="3-4"><xd:remove match="1" opid="2"><xd:remove match="2"><xd:remove match="2|4-15|17-103"><xd:remove match="1" subtree="no"><xd:remove match="11|13|18-25|27-28" opid="3"><xd:remove match="3|5-6|10|12|14-17|26|29"><xd:remove match="4" subtree="no"><xd:remove match="18"><xd:remove match="1-17" opid="4"><xd:remove match="1-2|30"><xd:remove match="9" subtree="no"><xd:remove match="1-3" opid="5"><xd:remove match="7-8|31"><xd:remove match="3"><xd:remove match="4-5" opid="6"><xd:remove match="1-3|6"><xd:node match="20"><xd:node match="7"><xd:node match="1"><xd:node match="2"><xd:node match="1"><xd:add match="/3/6/7/1/2/1/11|13|18-25|27-28" opid="3"><xd:add match="/3/20/7/1/2/1/3|5-6|11|13|15-18|27|30" opid="7"><xd:add type="1" name="DataSet" ns="http://www.iec.ch/61850/2003/SCL"><xd:add type="2" name="name">StatUrgA<xd:add match="/3/20/7/1/2/1/4/19-20" opid="8"><xd:add><fcda doname="Op" fc="ST" ldinst="LD0" lnclass="PFRC" lninst="5" prefix="FR" xmlns="http://www.iec.ch/61850/2003/SCL"><xd:add match="/3/20/7/1/2/1/4/17-18" opid="9"><xd:add match="/3/6/7/1/2/1/4/1-17" opid="4"><xd:add match="/3/6/7/1/2/3/1" opid="2"><xd:add match="/3/20/7/1/2/1/2|7|10" opid="10"><xd:add type="1" name="ReportControl" ns="http://www.iec.ch/61850/2003/SCL"><xd:add type="2" name="bufTime">100<xd:add type="2" name="buffered">true<xd:add type="2" name="confRev">200<xd:add type="2" name="datSet">StatUrgA<xd:add type="2" name="intgPd">3000<xd:add type="2" name="name">rcbStatUrgA<xd:add type="2" name="rptID">AA1H213DR1LD0/LLN0.rcbStatUrgA<xd:add match="/3/6/7/1/2/1/9/1-3" opid="5"><xd:add match="/3/20/7/1/2/1/9|31" opid="11"><xd:remove match="12|14|19-26|28-29"><xd:remove match="3|5-6|11|13|15-18|27|30" opid="7"><xd:remove match="4" subtree="no"><xd:remove match="19-20" opid="8"><xd:remove match="17-18" opid="9"><xd:remove match="1-16|21-22"><xd:remove match="1"><xd:remove match="2|7|10" opid="10"><xd:remove match="8"><xd:remove match="9|31" opid="11"><xd:node match="16"><xd:node match="6"><xd:node match="1"><xd:node match="2"><xd:node match="1"><xd:remove match="4"><xd:add match="/3/20/4-5" opid="12"><xd:remove match="3-4"><xd:descriptor opid="1" type="move"><xd:descriptor opid="2" type="move"><xd:descriptor opid="3" type="move"><xd:descriptor opid="4" type="move"><xd:descriptor opid="5" type="move"><xd:descriptor opid="6" type="move"><xd:descriptor opid="7" type="move"><xd:descriptor opid="8" type="move"><xd:descriptor opid="9" type="move"><xd:descriptor opid="10" type="move"><xd:descriptor opid="11" type="move"><xd:descriptor opid="12" type="move">
Expected Output
22. IED Attribute: AA1L3114AR1 || 5. AccessPoint Attribute: LD0 || 0. Server || 1. LDevice Attribute: Protection || 0. LN0 Attribute: Protection LLN0 ||
I get it for some files but it crashes for others as it does not have attributes some times but has child with same name with out attribute but has the description different. Cases keep changing all time.
Or if any other ways to find difference between 2 xml file.
|
|
|
|