|
Easiest way is to Load this xml into a dataset and read this from the dataset
DataSet ds=new DataSet();
ds.ReadXml("Filepath");)
|
|
|
|
|
Ohh, thanks alots
I tried so hard and got so far
|
|
|
|
|
USE THIS CODE U WILL GET UR REQUIRED FORMAT
using System;
using System.Xml;
namespace ConsoleApplication1
{
class Class1
{
static void Main(string[] args)
{
XmlTextReader reader =new XmlTextReader("path of file");
string id=null;
string productname=null;
string quantity=null;
string unitprice=null;
while(reader.Read())
{
switch(reader.NodeType.ToString())
{
case "Element":
switch(reader.Name.ToString())
{
case "id" :
id = reader.ReadElementString().ToString();
break;
case "productname":
productname = reader.ReadElementString().ToString();
break;
case "quantity":
quantity = reader.ReadElementString().ToString();
break;
case "unitprice":
unitprice = reader.ReadElementString().ToString();
break;
}
break;
case "EndElement":
if( reader.Name.ToString() == "item")
{
Console.WriteLine(id +" "+ productname +" "+ quantity +" "+ unitprice);
id=null;
productname=null;
quantity=null;
unitprice=null;
}
break;
}
}//while
}
}
}
|
|
|
|
|
Im making a POS system i also have the code here but it still doesnt work so how do i make this right?
|
|
|
|
|
That is 100% impossible to answer. What exactly "still does not work" and what does "still does not work" actually mean??
Show code.
Show exception
What receipt printer are you using?
What API are you using to communicate with receipt printer?
you need to be much more specific with questions on a technical board.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Why dont you use text file option, may be it wont work with your specific situation, but i am using text file with list box to print my items.
cheers
Naveed Kamboh
|
|
|
|
|
|
hi..
I am reading a XML file using XMLTextReader... after reading some contents i want to jump back to first statement of the XML file... Any solution
Thanks
|
|
|
|
|
Use XmlDocument instead:
<br />
XmlDocument doc = new XmlDocument();<br />
doc.Load("c:\\1.xml");<br />
...<br />
Best regards, Alexey.
|
|
|
|
|
Help pls reply ASAP.
|
|
|
|
|
May be long but why dont u put the contents in txt file print that file directly to printer
when u r filling listbox create and write contents to text file also and then u may use a print button to print or whatever u like. I did this and its working fine.
May anyone give you better solution.
Sorry for this idea if you don't like.
Naveed Kamboh
|
|
|
|
|
|
I have made an image list and mapped this image index unto my toolbar buttons.. When I compile my program, the images does not show in my toolbar buttons.. Does anybody have a solution to my problem??
|
|
|
|
|
Have you associated the image list with the tool bar using the ImageList property?
Can the program access the images at runtime? (Either from a resource or from file)
Graham.
|
|
|
|
|
Hi,
I create a customized DataGridTextBoxColumn class, I override the Paint method. everything is fine.
My question is how to get rid of the textbox control's focus, that means when user click on a cell, the textbox will not show (like no I bar).
I try HideEditBox() on the gotfoucus event of the textbox, it works, but with a blink. I try the textbox.caputured property, it doesn't work.
is there any good way to solve the problem??
Thanks a lot!
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
Hi,
override Edit in your customized DataGridTextBoxColumn class and don't call the base implementation.
|
|
|
|
|
Thanks a lot!!!
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
I want to make a tool that just like "Windows Picture and Fax Viewer overview".
1. Increase or decrease the image preview size.
2. View the image in full size or as the best fit for your window.
3. Manage image files and print, save, delete, or change file details.
4. Open the image in an editing program if you wish. Note that this closes Windows Picture and Fax Viewer.
5. Rotate images right or left by 90 degrees.
Thanks a lot for help in advance!
|
|
|
|
|
This is all possible using GDI and C#:
1, 2 and 5 can be done using Graphics and the System.Drawing namespace
3 using System.IO
4 using the System.Diagnostics.Process class
Search CP for GDI and System.Drawing articles
Regards, Graham.
|
|
|
|
|
Hi
How i can make adrag and drop to any control to another one ?
please if you can send me rapidly !
Mahmmoud_eid@yahoo.com
|
|
|
|
|
|
Hello, Once I make a .NET software and I can put that message "Copyright owned by me..etc" in the HELP - ABOUT... but is it enough ? If some one decompile my code and make another version with his copyright name, what is the protection here... Should I have to register my product with some copyright protection companies etc... ?
|
|
|
|
|
Copyright can be thorny at times. Any original work which you create in most countries automatically gain copyright protection. This is the situation in the UK, where there is no need to contact authorities or pay fees to have something copyrighted (In fact there is no such procedure).
If someone was to decompile your executable and completely reimplement the algorithm then this is legally fine. Notice I mentioned "completely"; this would involve rewriting the decompiled code to avoid the similarities in syntax whilst performing the same algorithm. Now if they were to pass your original code (however they gain it) off as their own or using the decompiled code without reimplemtation this will break that copyright protection.
Copyright doesn't protect the idea or algorithm, only the implementation of that idea/algorithm. If you want to protect an idea/algorithm then patents are the only legal means. E.g. Amazon patented the one-click shopping cart. Personally though, I think patents are nasty, and hinder software development.
I'm no lawyer, so what I've said may not be totally accurate.
Regards, Graham.
-- modified at 19:11 Monday 24th April, 2006
|
|
|
|
|
Thanks Graham for your reply. I understood and i got my answer. I found dotNetProtector as a nice software for obsfucating .net assemblies but it is expensive (300 euro = almost 500$ Canadian), So I was thinking, what is the risk if I dont obsfucate my code and directly publish in CNET and my website for sale, but now I realized I should go for dotnetprotector to obsfucate, atleast making decmolie process harder unless someone is really desparate to break my codes...
Thanks again
Emran
|
|
|
|
|
Obsfuscating your code I think is the best solution. BTW, Visual Studio comes with a free community edition of a obsfuscator. I'm sure there's a link to the installer from the Start Menu.
|
|
|
|