I am trying to fetch an XML value from a database, but do not know where to even begin. Basically, I have some XML in a mysql field type of text, and the value I am trying to fetch is "Rachels" as shown here:
<void property="name">
<string>Rachels</string>
</void>
I am using mysqli procedural, so would like the code in that format.
My code so far looks like this. This code fetches the whole field, not just that one value I want it to fetch.
$blob_query = mysqli_query($dbh8, "SELECT * FROM objstore WHERE obj_id='$characterId' AND type='PLAYER' AND namespace_int='3' ORDER BY obj_id DESC LIMIT 1");
if($blob_query){
$blob_row = mysqli_fetch_assoc($blob_query);
echo $blob_row['data'];
}
So I need to extract the value from that XML. Thanks for the help in advance!