|
To be honest I am probably wanting to do this through a lack of knowledge than anything else.
I need to generate a generic codefunction that will parse out values from an XML string. Which sounds simple enough, load it into an XmlDocument, use Xpaths to extract data.
The problem is that the XML string may or may not contain namespaces. As I do not know which (if any) namespaces will be present, I cannot (I believe) create an XmlNamespaceManager. Without the manager I cannot use XPaths to retrieve values. By stripping them out I can easily process the document (at this stage of the code they are irrelevant to the application)
Feel free to enlighten me if I have gone speeding down the wrong track
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
If some elements are qualified with a namespace, then add a prefix with an empty string for the namespace to the XmlNamespaceManager . Stripping namespaces can often be very dangerous. Lets say, for example, you wanted to modify a SOAP document. If you strip the namespaces and then send it to the server or the client, it will fail because the SOAP elements won't be found.
There is plenty of documentation on XML namespaces both on MSDN and elsewhere on the 'net. If you want the technical specification, see the XML namespaces spec on the W3C site at http://www.w3.org/TR/REC-xml-names[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello gurus,
I can send/receive bytes using sockets using SocketStream.Write or SocketStream.Read with a buffer of bytes with a fixed length.
I would like to send a class or a structure with a variable length??? How can I do that? Where can I get a sample C# code?
Thanks for the help.
Best regards.
There is no spoon.
|
|
|
|
|
You can send objects with the BinaryFormatter and SoapFormatter classes in System.Runtime.Serialization.Formatters.
A sample is in the documentation of BinaryFormatter.Serialize.
|
|
|
|
|
Hello gurus,
There is no spoon.
|
|
|
|
|
Hi!
Yes, there is a spoon! I'm using it to dig myself out of prison!
RageInTheMachine9532
|
|
|
|
|
And "because it hurts more!" (in regard to digging someone's heart out with a spoon )
Is that how you got into prison?
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
oops, sorry...
It seems I posted two times this topic... sorry :p
There is no spoon.
|
|
|
|
|
I took a wrong turn somewhere...
I got this map from a smart-ass, grey rabbit, and well, you know...
RageInTheMachine9532
|
|
|
|
|
Hello,My problem is that In my project I have added 3 small C# project files each containing references of some C# dll's which is also contained in that project folder .Now when I copy the entire folder to some new place and run it from there ,it doesn't run independently..i.e. making changes from new place affects older one...if anyone have idea in this regard then plz answer ...thanks in advance
Bugfixer
|
|
|
|
|
u have a solution with more than one project. right.
What you can do is. Simply copy the namespace name of first project that you added in your solution to further all project.
if it is fine then go ahead other wise you can contact me i will write to you step by step.
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
When you add references to other projects in the Add Reference dialog, click on the Project tab and select the projects from there instead of using the assemblies themselves. Not only does this keep your build configuration in sync (so that when you do a release build, the release assemblies from each project are used), but it also establishes build dependencies so that if you make a change in a dependent project and compile the project that depends on it, both are recompiled.
Also: a word of warning. Using automatically generated assembly versions (when you specify an asterisk (*) in your AssemblyVersionAttribute is dangerous in large solutions, especially when there doesn't exist a dependency that covers all projects (so that your executable would have a local copy of all current assemblies in your solution).
This is the correct way of solving this problem. The right assemblies using the right build and compiling against the right versions is always kept in sync.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
how to get the estimated time left when the program executing.
thanks.
Rock Throught The Night
|
|
|
|
|
Estimated time of what?
How long will a file be downloading, or how long will the coffe machine use to make a cup of coffe?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
how to get the estimated time left when the program executing.
thanks.
Rock Throught The Night
|
|
|
|
|
What is executing!? What does the program do? What do you want to monitor progress on?
The "program executing" can be ANYTHING. Most windows programs don't stop executing until the user clicks Close/Quit.
RageInTheMachine9532
|
|
|
|
|
Sounds like he may want a brief description of a solution to the halting problem...
|
|
|
|
|
What halting problem?
RageInTheMachine9532
|
|
|
|
|
|
hi
why dont exist "DataGridComboBoxColumn" class in dotnet 1.1
how to add combobox to datagrid in dotnet 1.1 ?
thanks
|
|
|
|
|
hai there,
who told you mscorp forget this ?
view this link
http://www.codeproject.com/cs/miscctrl/DataGridZen.asp
if this is not sufficinet for you then get back to me.
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
I have a form which takes a lot of initialisation time. The initialisation is done in the Form_load event. When the initialisation is finished the form becomes visible.
I want the form to be immediately visible and perform the initialisation while the form shows a wait message.
How can i achieve this?
|
|
|
|
|
You coudl use threading. And initialize in another thread.
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
All your base are belong to us!
scored a 5 from me, for making me laugh
|
|
|
|
|
hai there,
let me come to the point. i have a application that containe a pannel with some no of label controls. dynamically i need to remove or dispose the existing control and i need to create new label controls.
imp is i need to run the disposal or removal in standalone thread. (asyncronous). So i wrote a class which will accept a list of control and will remove the content.
using System;
using System.Threading;
using System.Runtime.Remoting.Messaging;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
public delegate void DisposingDel(params object[] aList);
namespace PlanningBoardSystem.Classes
{
public class AssynClass
{
public void MyCallback(IAsyncResult iar)
{
AsyncResult Ars=iar as AsyncResult;
DisposingDel DAsr=(DisposingDel)Ars.AsyncDelegate;
}
public void DisposeLabel(params object[] aList)
{
PlanningBoardSystem.OrderLineLabel CtlIns ;
foreach(Label Ctl in aList)
{
CtlIns= Ctl as PlanningBoardSystem.OrderLineLabel;
CtlIns.Dispose();
}
}
}
public class IAsyncronousCls
{
private object[] obj;
public IAsyncronousCls(params object[] a )
{
AssynClass AssynCls=new AssynClass();
DisposingDel DisDel=new DisposingDel(AssynCls.DisposeLabel);
AsyncCallback AsynCback=new AsyncCallback(AssynCls.MyCallback);
}
}
}
See this code is incompleted . If you know please complete this code and get back to me.
thanks.
enjoy coding
Sreejith SS Nair
|
|
|
|