<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>The UNIX and Linux Forums - High Level Programming</title>
		<link>http://www.unix.com/</link>
		<description>Post questions about C, C++, Java, SQL, and other programming languages here.</description>
		<language>en</language>
		<lastBuildDate>Sun, 29 Nov 2009 03:52:45 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>5</ttl>
		<image>
			<url>http://solaris.unix.com/images/misc/rss.jpg</url>
			<title>The UNIX and Linux Forums - High Level Programming</title>
			<link>http://www.unix.com/</link>
		</image>
		<item>
			<title>ways to eliminate zombie</title>
			<link>http://www.unix.com/high-level-programming/124789-ways-eliminate-zombie-new-post.html</link>
			<pubDate>Sat, 28 Nov 2009 06:06:50 GMT</pubDate>
			<description>what are the precautions to be taken care for avoiding zombie process ?</description>
			<content:encoded><![CDATA[<div>what are the precautions to be taken care for avoiding zombie process ?</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>Gopi Krishna P</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124789-ways-eliminate-zombie.html</guid>
		</item>
		<item>
			<title>How to use we use int64?</title>
			<link>http://www.unix.com/high-level-programming/124724-how-use-we-use-int64-new-post.html</link>
			<pubDate>Fri, 27 Nov 2009 09:14:34 GMT</pubDate>
			<description>Recently my project needs int64 variables. However my os and computer are both 32bits. 
So how can i use int64 as a parameter in a function. 
and is int64 a structure as user-defined structures..... 
??? 
thanx 
i am waiting for ur answer:rolleyes:</description>
			<content:encoded><![CDATA[<div>Recently my project needs int64 variables. However my os and computer are both 32bits.<br />
So how can i use int64 as a parameter in a function.<br />
and is int64 a structure as user-defined structures.....<br />
???<br />
thanx<br />
i am waiting for ur answer:rolleyes:</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>macroideal</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124724-how-use-we-use-int64.html</guid>
		</item>
		<item>
			<title>c executing shell problem</title>
			<link>http://www.unix.com/high-level-programming/124713-c-executing-shell-problem-new-post.html</link>
			<pubDate>Fri, 27 Nov 2009 06:45:57 GMT</pubDate>
			<description><![CDATA[Hello 
im geting error here: 
 
 
Code: 
--------- 
#include <stdlib.h> 
#include <stdio.h> 
using namespace std; 
int main (int argc, char *argv[])]]></description>
			<content:encoded><![CDATA[<div>Hello<br />
im geting error here:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#include &lt;stdlib.h&gt;<br />
#include &lt;stdio.h&gt;<br />
using namespace std;<br />
int main (int argc, char *argv[])<br />
{<br />
char user[20];<br />
string command;<br />
&nbsp;<i>cin &lt;&lt; user;<br />
command = printf (&quot;grep '%s' /etc/shadow&quot;, user);<br />
<br />
system (command.c_str());</i><br />
&nbsp;}<br />
&nbsp;return 0;<br />
}</code><hr />
</div>it should search shadow file for a entered user, but it shows &quot;sh not found&quot;</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>velniaszs</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124713-c-executing-shell-problem.html</guid>
		</item>
		<item>
			<title>Xlib mouse events and ButtonPressMask</title>
			<link>http://www.unix.com/high-level-programming/124711-xlib-mouse-events-buttonpressmask-new-post.html</link>
			<pubDate>Fri, 27 Nov 2009 06:12:48 GMT</pubDate>
			<description>I have written a simple program which will report key press and release events for a particular window. In my case, it is mostly the terminal since I invoke the program from the terminal. I am able to get the key press and release events taking place in the terminal window (I have used...</description>
			<content:encoded><![CDATA[<div>I have written a simple program which will report key press and release events for a particular window. In my case, it is mostly the terminal since I invoke the program from the terminal. I am able to get the key press and release events taking place in the terminal window (I have used XSelectInput() with KeyPressMask and KeyReleaseMask on the terminal) but the same is not working with ButtonPress and ButtonRelease. Not just these, but any events related to the mouse are not being reported. Any idea why this is happening?<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
<br />
int main() {<br />
Display *display = XOpenDisplay(NULL);<br />
KeySym k;<br />
int revert_to;<br />
Window window;<br />
XEvent event;<br />
<br />
XGetInputFocus(display, &amp;window, &amp;revert_to);<br />
XSelectInput(display, window, KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask);<br />
<br />
while(1)<br />
{<br />
XNextEvent(display,&amp;event);<br />
switch (event.type) {<br />
<br />
case KeyPress : printf(&quot;Key Pressed\n&quot;); break;<br />
case KeyRelease : printf(&quot;Key Released\n&quot;); break;<br />
case ButtonPress : printf(&quot;Button Pressed\n&quot;); break;<br />
case ButtonRelease : printf(&quot;Button Released\n&quot;); break;<br />
case EnterNotify : printf(&quot;Enter\n&quot;); break;<br />
}<br />
}<br />
XCloseDisplay(display);<br />
return 0;<br />
}</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>abhinav.zoso</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124711-xlib-mouse-events-buttonpressmask.html</guid>
		</item>
		<item>
			<title>Help for coding this programme</title>
			<link>http://www.unix.com/high-level-programming/124685-help-coding-programme-new-post.html</link>
			<pubDate>Thu, 26 Nov 2009 18:58:15 GMT</pubDate>
			<description>for a floating-point array x whose size is n, find the geometric mean.. 
 
GM =n  x1.x2.x3...xn</description>
			<content:encoded><![CDATA[<div>for a floating-point array x whose size is n, find the geometric mean..<br />
<br />
GM =n  x1.x2.x3...xn</div>


	<br />
	<div style="padding:6px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<table cellpadding="0" cellspacing="3" border="0">
			<tr>
	<td><img class="inlineimg" src="http://solaris.unix.com/images/attach/bmp.gif" alt="File Type: bmp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="http://www.unix.com/attachments/high-level-programming/1196d1259262340-help-coding-programme-untitled.bmp" target="_blank">untitled.bmp</a> (273.1 KB)</td>
</tr>
			</table>
			</fieldset>
	

	

	</div>
]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>allyjaah</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124685-help-coding-programme.html</guid>
		</item>
		<item>
			<title>Client socket</title>
			<link>http://www.unix.com/high-level-programming/124659-client-socket-new-post.html</link>
			<pubDate>Thu, 26 Nov 2009 09:23:47 GMT</pubDate>
			<description><![CDATA[Am trying to connect to local machine on port 9102 
There is no server application listening on port 9102. 
 
  
Code: 
--------- 
if (connect(fd,(struct sockaddr *)&addr, (socklen_t)sizeof(struct sockaddr)) == -1) 
   return -1; 
 cout<<"Connected ,ERRNO:"<<errno<<", txt:"<<strerror(errno);...]]></description>
			<content:encoded><![CDATA[<div>Am trying to connect to local machine on port 9102<br />
There is no server application listening on port 9102.<br />
<br />
 <div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">if (connect(fd,(struct sockaddr *)&amp;addr, (socklen_t)sizeof(struct sockaddr)) == -1)<br />
&nbsp;  return -1;<br />
&nbsp;cout&lt;&lt;&quot;Connected ,<acronym title="Error Number">ERRNO</acronym>:&quot;&lt;&lt;<acronym title="Error Number">errno</acronym>&lt;&lt;&quot;, txt:&quot;&lt;&lt;strerror(<acronym title="Error Number">errno</acronym>);</code><hr />
</div><br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">netstat -na |grep 9102<br />
tcp&nbsp; &nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0 192.168.151.42:9102&nbsp; &nbsp; &nbsp; &nbsp;  192.168.151.42:9102&nbsp; &nbsp; &nbsp; &nbsp;  ESTABLISHED</code><hr />
</div>And the o/p<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Connected ,<acronym title="Error Number">ERRNO</acronym>:42, txt:No message of desired type</code><hr />
</div><br />
Any suggestion?</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>johnbach</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124659-client-socket.html</guid>
		</item>
		<item>
			<title>Make error</title>
			<link>http://www.unix.com/high-level-programming/124364-make-error-new-post.html</link>
			<pubDate>Mon, 23 Nov 2009 03:23:18 GMT</pubDate>
			<description><![CDATA[Hello, 
 
Is someone know why this generate an error : 
 
 
Code: 
--------- 
all: 
    dt = $(shell date) 
    echo "$(dt)"]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
Is someone know why this generate an error :<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">all:<br />
&nbsp; &nbsp; dt = $(shell date)<br />
&nbsp; &nbsp; echo &quot;$(dt)&quot;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>X-Or</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124364-make-error.html</guid>
		</item>
		<item>
			<title>Beginners question about fork</title>
			<link>http://www.unix.com/high-level-programming/124210-beginners-question-about-fork-new-post.html</link>
			<pubDate>Fri, 20 Nov 2009 00:50:21 GMT</pubDate>
			<description><![CDATA[Hi everyone: 
 
I'm developing a dynamic library for notifications, this library is used for a daemon that i've programmed, when something goes wrong the library should send an email to an administrator, but since sending an email is a non-vital process then it can fail (it should work as an...]]></description>
			<content:encoded><![CDATA[<div>Hi everyone:<br />
<br />
I'm developing a dynamic library for notifications, this library is used for a <acronym title="Disk and Execution Monitor">daemon</acronym> that i've programmed, when something goes wrong the library should send an email to an administrator, but since sending an email is a non-vital process then it can fail (it should work as an asynchronous process) so i'm considering to do that by using the fork function, however the entire process of <acronym title="Disk and Execution Monitor">daemon</acronym> will be forked and i would be responsible for destroying the child process, so my question is, does exist any way more efficient to do this?<br />
<br />
thanks in advance</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>edgarvm</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124210-beginners-question-about-fork.html</guid>
		</item>
		<item>
			<title>stat64 support on 32bit platform</title>
			<link>http://www.unix.com/high-level-programming/124062-stat64-support-32bit-platform-new-post.html</link>
			<pubDate>Wed, 18 Nov 2009 16:18:21 GMT</pubDate>
			<description>I have to get the size and ownership of a file on a 32 bit solaris 10.stat function fails to provide the information as the file size is greater than 2GB(26GB).Is stat64 supported on 32 bit platforms.Can i use the function on all the platforms</description>
			<content:encoded><![CDATA[<div>I have to get the size and ownership of a file on a 32 bit solaris 10.stat function fails to provide the information as the file size is greater than 2GB(26GB).Is stat64 supported on 32 bit platforms.Can i use the function on all the platforms</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>guru13</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/124062-stat64-support-32bit-platform.html</guid>
		</item>
		<item>
			<title>Test Coverage - executing this code</title>
			<link>http://www.unix.com/high-level-programming/123994-test-coverage-executing-code-new-post.html</link>
			<pubDate>Tue, 17 Nov 2009 22:23:12 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I am trying to gain test coverage on the 'fold' program in unix and am having difficulty executing the following code: 
 
 
Code: 
--------- 
if(ferror (istream)) 
{ 
	error (0, errno, "%s", filename);]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I am trying to gain test coverage on the 'fold' program in unix and am having difficulty executing the following code:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">if(ferror (istream))<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; error (0, <acronym title="Error Number">errno</acronym>, &quot;%s&quot;, filename);<br />
&nbsp; &nbsp; &nbsp; &nbsp; if(!STREQ (filename, &quot;-&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fclose (istream);<br />
&nbsp; &nbsp; &nbsp; &nbsp; return 1;<br />
}<br />
if (!STREQ (filename, &quot;-&quot;) &amp;&amp; fclose (istream) == EOF)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; error (0, <acronym title="Error Number">errno</acronym>, &quot;%s&quot;, filename);<br />
&nbsp; &nbsp; &nbsp; &nbsp; return 1;<br />
}</code><hr />
</div>How could I cause an error to occur in the input stream using the fold command in the command prompt (i.e. fold &lt; input).<br />
<br />
Thank you!</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>Jakeman1086</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/123994-test-coverage-executing-code.html</guid>
		</item>
		<item>
			<title>Unicode programing in C</title>
			<link>http://www.unix.com/high-level-programming/123986-unicode-programing-c-new-post.html</link>
			<pubDate>Tue, 17 Nov 2009 20:25:14 GMT</pubDate>
			<description>im starting to go a little serious with c, woking in a personal project that will read a xml, which might contain Unicode characters (i know it will on my system, which is set to es_AR.UTF-8) 
 
im using mxml, and the documentation says it uses utf8 internally (no worries here). 
so i need to be...</description>
			<content:encoded><![CDATA[<div>im starting to go a little serious with c, woking in a personal project that will read a xml, which might contain Unicode characters (i know it will on my system, which is set to es_AR.UTF-8)<br />
<br />
im using mxml, and the documentation says it uses utf8 internally (no worries here).<br />
so i need to be sure im using utf8 in my program. to be sure that i can safely interact with mxml and to be sure my program will work in all languages.<br />
<br />
i have been reading alot, but i dont quite fully get how i can accomplish this.<br />
<br />
im going for something simple, something easy that wont demand much of me.<br />
<br />
my program will read user input (from cli for now, gtk later), and will save it in xml (is a config file for other app). it will also have the option to read a xml, and use it as a base for a new one <br />
<br />
now, i have a few concrete questions.<br />
a) do i have to use a special type of variable?<br />
if a) is true, then i need a hole new set of functions? (for strcmp, or strstr)<br />
b) can i work with unicode characters using char *?<br />
if b) is true, how do i &quot;make&quot; them utf8?<br />
c) is a mix of the above? then how to choose the mix ratio?<br />
<br />
i appreciate any help, manual, link, ect that can help me understand how this works. (that includes source code)<br />
<br />
thanks</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>broli</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/123986-unicode-programing-c.html</guid>
		</item>
		<item>
			<title>cc -- Unsatisfied symbols -- on HP-UX 10.2</title>
			<link>http://www.unix.com/high-level-programming/123972-cc-unsatisfied-symbols-hp-ux-10-2-a-new-post.html</link>
			<pubDate>Tue, 17 Nov 2009 16:25:50 GMT</pubDate>
			<description><![CDATA[Greetings, 
I am slowly learning a few things but am far from being an expert. I am at the point now that I 
would like to be able write some ANSI C code on HP-UX 10.2. Just a hobbie... I am just using cc, 
which came with the HP-UX 10.2 ... 
I don't have the manuals for the development...]]></description>
			<content:encoded><![CDATA[<div>Greetings,<br />
I am slowly learning a few things but am far from being an expert. I am at the point now that I<br />
would like to be able write some ANSI C code on HP-UX 10.2. Just a hobbie... I am just using cc,<br />
which came with the HP-UX 10.2 ...<br />
I don't have the manuals for the development environment...<br />
Anyway, I have the following sample code that illustrates that I am missing a library file<br />
when cc attempts to link??? That is the conclusion I have come to.<br />
I have looked through man pow, and man math and have not found the information I am looking for.<br />
 <br />
I am not sure 1) which library file is missing and 2) the syntax I need to use to poperly compile<br />
and link in the object files.<br />
Following is sample code that illustrates the issue I am having with cc<br />
Thanks in advance,<br />
Dirk<br />
 <br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">$ uname -a<br />
HP-UX green B.10.20 A 9000/782 2015827886 two-user license<br />
=========<br />
cat ex4_6.c<br />
#include &lt;stdio.h&gt;<br />
#include &lt;math.h&gt;<br />
&nbsp;<br />
&nbsp;<br />
main ()<br />
{<br />
float polyresult;<br />
polyresult = 3 * powf(2.55, 3) + 2 * powf(2.55, 2) + 6;<br />
printf(&quot;the result is %f\n&quot;, polyresult );<br />
&nbsp;<br />
}<br />
&nbsp;<br />
&nbsp;<br />
$ cc ex4_6.c<br />
/usr/ccs/bin/ld: Unsatisfied symbols:<br />
powf (code)</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>Dirk_</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/123972-cc-unsatisfied-symbols-hp-ux-10-2-a.html</guid>
		</item>
		<item>
			<title>DOM query selected path and show as xml</title>
			<link>http://www.unix.com/high-level-programming/123950-dom-query-selected-path-show-xml-new-post.html</link>
			<pubDate>Tue, 17 Nov 2009 11:35:11 GMT</pubDate>
			<description><![CDATA[First, I am sorry if this question not this room scope, 
 
I have a XML file : 
 
file: book.xml 
 
 
Code: 
--------- 
<?xml version="1.0" encoding="ISO-8859-1"?>]]></description>
			<content:encoded><![CDATA[<div>First, I am sorry if this question not this room scope,<br />
<br />
I have a XML file :<br />
<br />
file: book.xml<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;<br />
<br />
&lt;bookstore&gt;<br />
<br />
&lt;book category=&quot;COOKING&quot;&gt;<br />
&nbsp; &lt;title lang=&quot;en&quot;&gt;Everyday Italian&lt;/title&gt;<br />
&nbsp; &lt;author&gt;Giada De Laurentiis&lt;/author&gt;<br />
&nbsp; &lt;year&gt;2005&lt;/year&gt;<br />
&nbsp; &lt;price&gt;30.00&lt;/price&gt;<br />
&lt;/book&gt;<br />
<br />
&lt;book category=&quot;CHILDREN&quot;&gt;<br />
&nbsp; &lt;title lang=&quot;en&quot;&gt;Harry Potter&lt;/title&gt;<br />
&nbsp; &lt;author&gt;J K. Rowling&lt;/author&gt;<br />
&nbsp; &lt;year&gt;2005&lt;/year&gt;<br />
&nbsp; &lt;price&gt;29.99&lt;/price&gt;<br />
&lt;/book&gt;<br />
<br />
&lt;/bookstore&gt;</code><hr />
</div>I using this script If I want to show output of my script as xml file:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
function loadXMLDoc(dname)<br />
{<br />
if (window.XMLHttpRequest)<br />
&nbsp; {<br />
&nbsp; xhttp=new XMLHttpRequest();<br />
&nbsp; }<br />
else<br />
&nbsp; {<br />
&nbsp; xhttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
&nbsp; }<br />
xhttp.open(&quot;GET&quot;,dname,false);<br />
xhttp.send(&quot;&quot;);<br />
return xhttp.responseXML;<br />
}<br />
<br />
xml=loadXMLDoc(&quot;books.xml&quot;);<br />
document.write(&quot;&lt;xmp&gt;&quot; + xml.xml + &quot;&lt;/xmp&gt;&quot;); <br />
<br />
&lt;/script&gt;<br />
<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code><hr />
</div>Now, I want to select specific path of XML node. The output that I want is like: <br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;bookstore&gt;<br />
<br />
&lt;book category=&quot;COOKING&quot;&gt;<br />
&nbsp; &lt;title lang=&quot;en&quot;&gt;Everyday Italian&lt;/title&gt;<br />
&nbsp; &lt;author&gt;Giada De Laurentiis&lt;/author&gt;<br />
&nbsp; &lt;year&gt;2005&lt;/year&gt;<br />
&nbsp; &lt;price&gt;30.00&lt;/price&gt;<br />
&lt;/book&gt;<br />
&lt;/bookstore&gt;</code><hr />
</div>and this is my script:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
function loadXMLDoc(dname)<br />
{<br />
if (window.XMLHttpRequest)<br />
&nbsp; {<br />
&nbsp; xhttp=new XMLHttpRequest();<br />
&nbsp; }<br />
else<br />
&nbsp; {<br />
&nbsp; xhttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
&nbsp; }<br />
xhttp.open(&quot;GET&quot;,dname,false);<br />
xhttp.send(&quot;&quot;);<br />
return xhttp.responseXML;<br />
}<br />
<br />
xml=loadXMLDoc(&quot;books.xml&quot;);<br />
path=&quot;/*/*[@*='COOKING']/*&quot;<br />
var nodes=xml.selectNodes(path);<br />
document.write(&quot;&lt;xmp&gt;&quot; + nodes.xml + &quot;&lt;/xmp&gt;&quot;); <br />
<br />
&lt;/script&gt;<br />
<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code><hr />
</div>Unfortunatelly, the script totally error. I dont know how to fix this. :(<br />
<br />
Could you somebody please tell me how to print output only selected path criteria as xml?<br />
<br />
Your answer really appreciated,<br />
<br />
Thanks,<br />
Denny</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>penyu</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/123950-dom-query-selected-path-show-xml.html</guid>
		</item>
		<item>
			<title>String copy in C language</title>
			<link>http://www.unix.com/high-level-programming/123875-string-copy-c-language-new-post.html</link>
			<pubDate>Mon, 16 Nov 2009 17:18:46 GMT</pubDate>
			<description>Hello, 
 
I have a text file (FILE.txt) that contains the following information: 
 
userAxxx.name@email.com        userA 
userBxxx.name@email.com        userB 
userxxCx.name@email.com        userC 
and more.... 
 
in scripting, I can easily do a grep and awk to store an email info into a string...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I have a text file (FILE.txt) that contains the following information:<br />
<br />
<a href="mailto:userAxxx.name@email.com">userAxxx.name@email.com</a>        userA<br />
<a href="mailto:userBxxx.name@email.com">userBxxx.name@email.com</a>        userB<br />
<a href="mailto:userxxCx.name@email.com">userxxCx.name@email.com</a>        userC<br />
and more....<br />
<br />
in scripting, I can easily do a grep and awk to store an email info into a string variable as following:<br />
<br />
EMAL=`grep userA | awk '{print $1}' FILE.txt`<br />
or <br />
EMAIL=`nawk '$2 == &quot;userB&quot; {print $1}'  FILE.txt<br />
<br />
BUT, how do I translate above into C language?<br />
<br />
I'm new in c programming and very appreciate for your help.<br />
<br />
Thanks so much,<br />
tqlam</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>tqlam</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/123875-string-copy-c-language.html</guid>
		</item>
		<item>
			<title>how to execute the sql quires from shell script?</title>
			<link>http://www.unix.com/high-level-programming/123823-how-execute-sql-quires-shell-script-new-post.html</link>
			<pubDate>Mon, 16 Nov 2009 05:56:11 GMT</pubDate>
			<description><![CDATA[hi all, 
  
   I'm new to shell scripting, i want to know how to use the sql statements from the shell script? is there any documents or pdf to learn from the begining? plese provide me some useful links on the same.  
  
Thanks all in advance..,:b:]]></description>
			<content:encoded><![CDATA[<div>hi all,<br />
 <br />
   I'm new to shell scripting, i want to know how to use the sql statements from the shell script? is there any documents or pdf to learn from the begining? plese provide me some useful links on the same. <br />
 <br />
Thanks all in advance..,:b:</div>

]]></content:encoded>
			<category domain="http://www.unix.com/high-level-programming/">High Level Programming</category>
			<dc:creator>vij_krr</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/high-level-programming/123823-how-execute-sql-quires-shell-script.html</guid>
		</item>
	</channel>
</rss>
