Thanks to all who posted i later on realized my error i guess i was trying to code<br>lua in a c program.<br><br>As for anyone else who finds them selfs asking this same question you can do this two ways.<br><br>1. if (axl_cmp(value, "Hello")) {<br>
prinf("True \n");<br> }<br><br><br>2. cmp = "Hello";<br> if(strcmp(val,cmp) == 0) {<br> printf("True \n\n");<br> }<br> else {<br> printf("False \n\n");<br>
}<br><br><br><div class="gmail_quote">On Wed, Jun 11, 2008 at 6:39 PM, Steve Starr <<a href="mailto:steven.l.starr@gmail.com">steven.l.starr@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I was wondering how do you compare the value of a node or node contents<br>with a known value.<br><br>Xml Doc<br>-------------------------------------------------------------<br><?xml version="1.0" encoding="ISO-8859-1"?><br>
<br><root><br> <child1>Hello</child1><br> <child2>World</child2><br></root><br><br><br>Code Snippet<br>-------------------------------------------------------------<br>// get the first child node and its contents<br>
node = axl_node_get_first_child (node);<br>value = axl_node_get_content_trim (node, NULL);<br>printf("Useing the axl_node_get_first_child function. \n");<br>printf("%s \n\n", value);<br> <br>/* Does value == Hello? */<br>
if (value == "Hello") {<br> printf("True \n");<br>}<br>else {<br> printf("False \n");<br>}<br><br><br>Terminal Output<br>-------------------------------------------------------------<br>
Useing the axl_node_get_first_child function. <br>Hello <br><br>False<br><br><br>The result always seems to be false.<br><br>Thanks Steven :)<br>
</blockquote></div><br>