I have an XML document as follows:
<Database>
<SMS>
<Number>"+447528349828"</Number>
<Date>"09/06/24</Date>
<Time>13:35:01"</Time>
<Message>"Stop"</Message>
</SMS>
<SMS>
<Number>"+447528349828"</Number>
<Date>"09/06/24</Date>
<Time>13:35:01"</Time>
<Message>"Stop"</Message>
</SMS>
</Database>
I am trying to check whether the number child node of the parent SMS node exists in the document (for validation purposes to avoid inserting duplicate data).
Any advice on a potential solution?
EDIT: The element will be compared to an input string. For example if(inputNumber == xmlDocNumber){ //Don't Insert New Element }