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>