SVG - Help getting an element's type

When a C_Picture variable displayed on a form has the structure shown below, is there a way using the SVG or XML DOM commands to find out the TYPE of object that id “R1” is without first opening the Picture in a SVG document (ie, SVG_Open_picture) and using SVG_Read_element_type?

In other words, I can use SVG GET ATTRIBUTE directly on the Picture to get the ‘stroke’ or ‘height’, but is there anything that can be used directly on the Picture to find out that the object with id=“R1” is a ‘rect’?

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

Thanks,

if you are in charge of creating the SVG,
it would be easier if you added a custom namespace.

e.g.

xmlns:whatever=“http://www.4D.com/2017/whatever

then add a custom attribute like

whatever:object-type=“rect”

I was setting the class attribute to do that, but wanted to see if I was missing a faster path to the information, and could keep the objects as small as possible. Namespace would offer more room for expansion however.

Thanks,