|
hi all
This is to read the tag line by line.
using System.Xml;
...
...
...
XmlTextReader reader = new XmlTextReader ("reader.xml");
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element: // The node is an element.
Console.Write("<" + reader.Name);
Console.WriteLine(">");
break;
case XmlNodeType.Text: //Display the text in each element.
Console.WriteLine (reader.Value);
break;
case XmlNodeType.EndElement: //Display the end of the element.
Console.Write("</" + reader.Name);
Console.WriteLine(">");
break;
}
}
Console.ReadLine();
How do i read the specific tag
if i just want to read all the tag that have this < big > tag?
thank you
modified on Monday, April 13, 2009 3:36 AM
|
|
|
|
|
use an XmlDocument[^] and the SelectNodes[^] method to search for specific nodes. This[^] article has a nice cheat sheet of the XPath syntax for searching for nodes.
|
|
|
|
|
I am developing an application in which I need to compare two pieces of VB code. I am searching a component which I can embed and do? Can any one help in this regard? Or any codes foe developing such a tool.
Regards
Surya
|
|
|
|
|
Hi,
I programatically have to create a windows application in which one windows schedular is there which is for calling a webmethod in a webservice...
how to create such program to call webmethod using windows schedular in C#.net.
Pls help me in this...
Advanced Thanks,
Ravi Vellanki
|
|
|
|
|
There is nothing special about Windows scheduler. You call the web methods as you usually would, in a regular app, then schedule your app to run using Windows scheduler.
If you don't know to create or consume web methods, use Google or buy a book.
|
|
|
|
|
Dear All,
I am trying to display this help file on button click event,
Microsoft® HTML Help Executable
and i want to edit and save it.
Please guide me how i can do this i am also searching for this.
Thanks
Sajjad Ali
|
|
|
|
|
In Help button event to show the help file.
u can use the methos " System.Diagnostics.Process.Start("yourHelpFile")"
in web format.
usually, the help is not needed to be edited, when show to the user.
|
|
|
|
|
I done it it is working now,
But i want to edit and save .chm file.
and again want to display it in application.
What should i do for this i have down loaded editor for .chm file but now i am getting where i have to start it.
Please do replay.
Sajjad
|
|
|
|
|
I have a dataset,and have defined a table in it,and now,I want to copy another table's data to this dataset's table.How to do this?
Thank you.
Always do you best,what you plant you will harvest
later!
|
|
|
|
|
This question has been done.Use DataSet's Merge method can do this.thank you.
Always do you best,what you plant you will harvest
later!
|
|
|
|
|
Hi,
I am trying to enable the keypress event for 'F5' key to refresh my form... Because I found that the normal KeyPress event does not work for function keys, I tried overriding the PreProcessMessage() function, as follows :
public override bool PreProcessMessage(ref Message msg)
{
try
{
if (msg.Msg == WM_KEYDOWN)
{
Keys keyCode = (Keys)msg.WParam & Keys.KeyCode;
if (keyCode == Keys.F5)
{
//code
}
}
return PreProcessMessage(ref msg);
}
catch (Exception ex)
{
throw;
}
}
But the control never gets into this method... Can anyone help me fix this?
Thanks in advance,
ramzg
|
|
|
|
|
You should change the keypreview property to true of form. if it is set to false.
|
|
|
|
|
Hi S a n d y,
I tried what had posted... But still, the control doesnt get inside the method... Do i have to do something else?
Thanks,
ramzg
|
|
|
|
|
You use the wrong syntax!, the correct syntax is
protected override bool ProcessCmdKey(
ref Message m,
Keys keyData
)
Try this:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.F5)
{
MessageBox.Show("F5 pressed!");
}
return base.ProcessCmdKey(ref msg, keyData);
}
Hope this help.
*12Code
|
|
|
|
|
Hi 12Code,
Thanks a lot for the help... It is working now...
Thanks,
ramzg
|
|
|
|
|
Hi,
How can i convert C++ to C# or any other VS languages?
Thankyou
YPKI
|
|
|
|
|
ypki wrote: How can i convert C++ to C# or any other VS languages?
By reading and understanding what the C++ application is doing then re-writing it in C#.
If it is managed C++ then you might be able to run the assemblies through Red Gate's Reflector to see what they produce as it could be a viable shortcut.
|
|
|
|
|
The C plus plus is similar with the C sharp. If this project is not too big, you can create a C sharp project, and then add these C++ files to this project, and comment codes in these files, and then modify format from c++ to C# format one class by one class.
|
|
|
|
|
Unless you are using Managed C++ (and even that is stretching things) this is utter rubbish.
C# may have been modelled on a mix of C++ and other languages but its resemblance is only passing. The main difference is that the framework is totally different. This means you have to find equivalents for things that look nothing alike and may operate in different ways.
For example, if you have an MFC application written in C++ using CView and CDocument classes then you will have to re-write those classes as C# has no direct equivalent. And what happens when you have a situation in C++ where there is a lot of low level memory manipulation? You can't do that easily in C#.
|
|
|
|
|
This is correct - for most of the C/C++ library and for low level memory manipulation you are better off starting from scratch.
However... for the rest there is a fairly logical process for conversion which can be implemented and is implemented in some source code converters.
David Anton
http://www.tangiblesoftwaresolutions.com
Convert VB to C#, C++, or Java
Convert C# to VB, C++, or Java
Convert C++ to C#, VB, or Java
Convert Java to C#, C++, or VB
|
|
|
|
|
So, if you strip out the C/C++ libraries and the low level memory manipulation, how much is left? Thinking about my old C++ projects, very little I'd reckon.
|
|
|
|
|
Not necessarily. Some apps have a lot of internal business logic that isn't library intensive and doesn't have any low level memory manipulation. And some library references which do have direct equivalents are used a lot (STL collections, Math, console IO, etc.).
David Anton
http://www.tangiblesoftwaresolutions.com
Convert VB to C#, C++, or Java
Convert C# to VB, C++, or Java
Convert C++ to C#, VB, or Java
Convert Java to C#, C++, or VB
|
|
|
|
|
plzzzzz help
I write the code for importing data from excel
as u suggest me via link given by u
I place a grid view , dbl clk it ,place coding in it
replace datagrid with grid view,n bind it.
It runs but does not show any data.
plzzzz help me
|
|
|
|
|
Hi,
what error you are getting ?
Did u try putting Try Catch ?
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hi,
I have a listening port and it should handle many number of clients at a time.
When i try with 10-25 clients in LAN, its work fine. My doubt is that will it be sucess when it upload to the web, where many number of users acess the server from diffrent part of the world.
Below code is used to listen as server. Please verify the code for multipe number of client, what will be the approximate limit of clients can connect?
strHostName = Dns.GetHostName();
IPHostEntry ipEntry = Dns.GetHostByName( strHostName );
aryLocalAddr = ipEntry.AddressList;
Socket s_listen = new Socket(AddressFamily.InterNetwork,SocketType.Stream, ProtocolType.Tcp);
s_listen.Bind(new IPEndPoint(aryLocalAddr[0], 400));
s_listen.Blocking = true;
s_listen.Listen(-1);
// Setup a callback to be notified of connection requests
s_listen.BeginAccept(new AsyncCallback(app.OnConnectRequest), s_listen);
-----
public void OnConnectRequest( IAsyncResult ar )
{
Socket lis = (Socket)ar.AsyncState;
NewCon( lis.EndAccept( ar ) );
lis.BeginAccept( new AsyncCallback( OnConnectRequest ), lis );
}
thankyou
YPKI
|
|
|
|