|
I do this:
<pre>XDocument xmlDoc = new XDocument();
if (indice == 1)
{
xmlDoc =
new XDocument(
new XDeclaration("1.0", Encoding.UTF8.HeaderName, String.Empty),
new XComment("Xml Document"),
new XElement("alinieri",
new XElement("align",
new XAttribute("id",indice),
new XElement("edtlr-def",entry_node[idx]),
new XElement("wnrom-synset", wn_synset)
)
)
);
xmlDoc.Save("alinieri.xml");
}
</pre>
my entry_node[idx] is a string containing xml code,same is wn_synset.
My problem is that in the saved xml it shows this(just the beginning):
<alinieri>
<align id="1">
<edtlr-def><definition>
<SpecDef>(Uneori cu determinări care indică sursa, provenienţa)</SpecDef>
instead of
<definition><specdef>(Uneori cu determinări care indică sursa, provenienţa)</specdef>
as it is in the one of the strings.
And the & lt ; & gt ; were supposed to be < >. What should I do? </definition></edtlr-def></align></alinieri>
<div class="ForumMod">modified on Wednesday, March 11, 2009 4:08 AM</div>
|
|
|
|
|
hi
how to write a dll component in C#.net?
how to start?
how to write?
howwwwwwww.......?
if you have an article or reference or book please introduce
Thanks
|
|
|
|
|
Create a new project "Dynamic Link Library" in Visual Studio, write your code, then compile it..
|
|
|
|
|
thanks for help
your purpose is WindowsFormsControlLibrary?
and how can i inherit from a control?
how can i add an event?
|
|
|
|
|
Try to learn C# Object Oriented Programming first...
public class MyControl : Control
{
public event EventHandler MyEvent;
...
}
|
|
|
|
|
|
learn how to use google or forget VS
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Member 4025191 wrote: if you have an article or reference or book please introduce
Multiple! The question at hand is whether you would actually read them.
Try this[^] one
I are troll
|
|
|
|
|
what is the similar code to application.startuppath in asp.net, i'm trying to write a xml file to get the db connection info.how can i do this.
|
|
|
|
|
With ASP.NET you usually do all that in the web.config file.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
i using this codes.....some times i get this error message...any one know why????
"the process cannot access the file because it is being used by another proces"
this is the message but its not using any other process...
here is my code
foreach (ListViewItem item in listView2.SelectedItems)
{
listView2.FocusedItem = listView2.Items[item.Index];
DSOFile.OleDocumentPropertiesClass file = new DSOFile.OleDocumentPropertiesClass();
file.Open(listView2.FocusedItem.Text, false, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess);
file.SummaryProperties.Title = tbxTitle.Text;
file.SummaryProperties.Subject = tbxSubject.Text;
file.SummaryProperties.Keywords = tbxKeywords.Text;
file.SummaryProperties.Author = tbxAuthor.Text;
file.SummaryProperties.Comments = tbxComments.Text;
file.Close(true);
MessageBox.Show("Changes Added into Selected File");
}
A S E L A
|
|
|
|
|
Hello,
Are you using any System.IO methods in your code (not shown) to files. If so, are you closing out the file in those methods?
-Colin
|
|
|
|
|
ya im using
"using Edanmo.OleStorage"
ya i closed the file once i used it.....that already in the code....
but some time able to do by dong click on another items and then click on that item back.....
any idea ?????
and thanks 4 ur reply
A S E L A
|
|
|
|
|
A S E L A wrote: its not using any other process
Not your application, but the file that you are trying to read is being used by another proces. You're opening a file on this line 'ere;
file.Open(listView2.FocusedItem.Text, false, ..
That's the file that is being used by another proces, and the statement can't be executed because of it. Are you using Microsoft Word to "look" at the data you're trying to import?
I are troll
|
|
|
|
|
its only use to read the summary property but once i use it, i close the file....every where....every time
is there got any thing to do like "flush" or etc... other than close();
A S E L A
|
|
|
|
|
The Close method should be sufficient, though that really depends on the implementation of the class that you're using to read the file. If "file" were a local variable, it could go out of scope and be garbage collected by the GC
I are troll
|
|
|
|
|
i guess the problem it closing.....
file.close(true); is not closeing all and every thing....
i tried
file.save();
file.close(fales);
still same....
A S E L A
|
|
|
|
|
Hello
Im writing a simple messenger and im having trouble with the
"Private Messages"
i worte the shared object between the clinet and the server
later all the clients subscribe to the server events Let Say "User Send Message" event
Now ,Let say that User "michael" wants to send Message to "liron"
So im iterating in server side on each Subscriber ,
How can i know which of the subscribers are "liron"?
can i find any value that identify "liron "?
UserSendMsgHandler messageDelegate = null;
Delegate[] invocationList_ = null;
try
{
invocationList_ = onUserSendMsg.GetInvocationList();
}
catch
{
}
if (invocationList_ != null)
{
lock (this)
{
foreach (Delegate del in invocationList_)
{
try
{
messageDelegate = (UserSendMsgHandler)del;
messageDelegate(Msg,Sender,Receivers[0]);
}
catch
{
onUserSendMsg -= messageDelegate;
}
}
}
}
|
|
|
|
|
I am using a dataset in businesslayer for getting project details like ProjectId,ProjectName,ProjectType. I want to return this collection to UI layer in a list or in some form of collection objects, but not using a dataset.
For eg: 1,'TestProject1','Maintenance'(ProjectId,ProjectName, ProjectType)
2,'TestProject2','Support'(ProjectId,ProjectName,ProjectType)
How can I store in business class and retrieve the same in UI layer? Somehow I created some properties and can added to the list. But don't know how to retrieve the same. Can anybody please help. Please let me know if I require to provide any more info.
Thanks,
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Create a list of a struct you create, which contains all the data you want to store for an object.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for immediate response. But I think I am not very clear on that. Can you please explain a little bit more? It would be great if you can provide an example.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Buy a basic C# book and read it, this is 101 stuff.
struct MyStuff
{
int id;
string name;
//etc
}
List<MyStuff> list = new List<MyStuff>();
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
What you can do is create a class named Project
e.g.
public class Project
{
public int projectid;
public string projectname;
public string projecttype;
}
Ok.. Then in the UI layer , in the class of any form . just create a generic list of Project;
i.e.
List<project> prj = new List<project>();
Now you can add the value to this list in any bussiness layer and then pass it to the ui
e.g.
List<project> lst = new List<project>();
foreach(DataRow drow in ds.Tables[0]) //Ds is dataset and your details are in table 0
{
Project temp = new Project();
temp.projectid = Convert.Toint32(drow["ProjectID"]);
temp.projectname = drow["ProjectNAme"].ToString();
...
lst.Add(temp);
}
return lst; //This lst will contain the list of products and you can bind it to any datagrid directly. .
|
|
|
|
|
i am a MSC computer science student .As a part of our course i have a 6 month projects.I am selected a topics as "SHARE THE CLICKBOARD ON NETWORK USING .NET REMOTING".Is it enough for 6 months?
|
|
|
|
|
Only you know how quick you work, but judging by your posts it will take yuo all of that as you don't seem to have a clue.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|