|
My xml file is below:
<?xml version="1.0" encoding="GB2312"?>
<root>
<node1>
<bmname>sichuan.bmp</bmname>
</node1>
<list>
<city>
<cityname>ganzi</cityname>
<point>(190,270)</point>
</city>
<city>
<cityname>mianyang</cityname>
<point>(467,190)</point>
</city>
<city>
<cityname>yaan</cityname>
<point>(346,335)</point>
</city>
</list>
</root>
There will be many cities in xml file,and I want to get city name,point of a city at a time and store them into a struct,then I use selectNodes("list"),but it return a NULL pointer, thus I consider that the only list node is the reason,so I use selectSingleNode("list"),but it also cannot work and return NULL pointer,I've no idea,hope your help
I love Aquamarine.
|
|
|
|
|
hey guy use the STL tools and first u have parse the xml document and seperate as tokens and then u can easily get the city and point into a sep structure. Try this.....
Shanmuga Sundar.V
|
|
|
|
|
hi,
use XPath query language.
"//list/city/*"
pass this query to SelectNodes(); it will return u list of cities.
Try it out. I cannot give u compilable code as I am using .NET IDE now a days.
Search on MSDN @ writting XPath query.
The chosen One
|
|
|
|
|
I have tried it, but it's the same, I have to ask for your help.When I use XPath:"//list/city/*", it returns a zero length, when I use "//city/*", it returns all of the nodes in list node rather than the number of citis, but I have to get the number of cities.
I love Aquamarine.
|
|
|
|
|
hi,
try to understand syntax of XPath. its simple.
first "/" means root node, second "/" means child node, in ur case "list" level, now u need to fire query to enumerate cities.
when u say "//city/*" u r on level of "city" node and u r gathering infor inside city node.
try this
"/list/city/*"
Try this out, till the time I will explore how 2 use XML in .NET!!
The chosen One
|
|
|
|
|
Solve it with XPath:"//citylist[1]/*", thank you for your reply.
I love Aquamarine.
|
|
|
|
|
Hi i need an api for atoi that is compatible with unicode.
I personally dont like this api, but i dont know anyother method to convert a string to integer, and also hexadecimal string to integer?
If any one know any alternative method for conversion and conversion of hexadecimal string please help
regards,
Prakash.
The World is getting smaller and so are the people.
|
|
|
|
|
_tcstol or _tcstoul should do the trick for you.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
|
In the project of cximage! How to debug ? In details ,I want to know when and how the program run in the j2k's code ? who can tell me? I thank you him/her first!!!
|
|
|
|
|
You should ask this question directly to the author, but as far as i know, you should compile the cximage in debug version, put the breakpoint where you need them and then debug the appilcation, surely you will get to the point where you want to debug..
regards,
Prakash.
The World is getting smaller and so are the people.
|
|
|
|
|
|
hi Roger Allen,
thanks fo ur suggestion. i use like this. but the dc return as null. one default printer is installed in my system. what's the problem.
AfxGetApp()->SelectPrinter(NULL,NULL,TRUE);
if(!AfxGetApp()->CreatePrinterDC(dc))
{
MessageBox("Error Occured While Printing");
return;
}
thanks Roger Allen
|
|
|
|
|
If you have a default printer on your system, you probably need to call
UpdatePrinterSelection(TRUE);
in your applications InitInstance() function. This will select he system wide default printer for your application as default. Then you will only need to do:
if (!AfxGetApp()->CreatePrinterDC(dc))
when you need a printer DC. Remove the SelectPrinter() line, as this is done for you in the UpdatePrinterSelection() call.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Thanks a lot Roger Allen.
Murali.M
|
|
|
|
|
1.How do I access the onpaint(WM_PAINT message handler)of the main window from the child window. For ex.While loading an image from child to parent window,the overlap portion has to be repainted on the parent window.
2.Can I integrate VB codes with VC++ ? and how?
3.What is vb5addin.dll. and why it is needed? and how I will use it through my programme.
|
|
|
|
|
try GetParent()!
Hello World!
|
|
|
|
|
If i got you rite, you want to send the onpaint message to the parent window.
so what you do is,
get the HWND or CWnd* of the parent window and Invaidate() it.
This will redraw your parent window.
The World is getting smaller and so are the people.
|
|
|
|
|
is it possible to transfer a file through PSTN without an internet?
if it is possible can anyone send me the details?
thanx
|
|
|
|
|
you can do it using the telnet,
The World is getting smaller and so are the people.
|
|
|
|
|
I have done this long back, You use Hyperterminal to dial the target number, the target person should also start hyperterminal and configure his modem in a server mode,(you need to know the correct AT command of the modem for that) then you dial the no, after establishing the connection you can then transfer files across.
hope i aswered your question.
regards,
Prakash.
|
|
|
|
|
Here is a code to figure out timer0's frequency of 8254
(1)First,
llCountOfBegin=KeQueryPerformanceCounter(&llFreq);
wCount2=ReadCount8254(0);//read timer0 count
while (lCountINT8<500)//wCount2 is the current count,
//wCount1 the former count
{
wCount1=wCount2;
wCount2=ReadCount8254(0);
if(wCount2>wCount1)
lCountINT8++;
}
llCountOfEnd=KeQueryPerformanceCounter(&llFreq);
lTemp=(ULONG)(llCountOfEnd.QuadPart-llCountOfBegin.QuadPart);
(2)Then the frequency is
freq=lCountINT8*llFreq.lFrqForCmpCount/lTemp;
However, there is a problem. The frequency that is evaluated in this way is twice of the theoretic value When I write an initial count(lCount) into timer0's counter. The theoretic value is: 1,193,200/lCount.
My test env is windows2000/xp. Do you know the reason and how to solve this problem?
Thanks for your attention!
|
|
|
|
|
I am doing this in Win32 and I wonder how would you search for a specific numbers or strings.
|
|
|
|
|
Read my articles on iostreams. IMO you should always use the C++ standard library as a first port of call, although there is no reason not to use OS specific API's if they perform better or do what you want.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I am looking for bitmap files that contain the following information headers: BITMAPCOREHEADER, BITMAPV4HEADER, BITMAPV5HEADER.
(Note: I have all the files with BITMAPINFOHEADER that I need)
If anyone knows of any bitmap files on the www that use the above headers, please let me know.
I would like to use them to test my code and creating them my self does not garantee that they are correct.
INTP
|
|
|
|