I have successfully used TinyXpath with root node as below
const char* xpath ="/MyRoot/A/B";
TinyXpath::xpath_processor xp_proc(mRootElement, xpath);
(this will find all B under all A of MyRoot)
I wonder if I can pass non-root element to the constructor something like below
const char* xpath = "./A/B";
TinyXpath::xpath_processor xp_proc(A_Element, xpath);
(I want to find all B under specific A, when I have A_Element)
Thank you
Given this constructor definition from the TinyXPath documentation:
You could have:
provided that
A_Elementis of typeTiXmlNode*This will select all
Belements that are children of anAelement that is a child of the element referenced byA_Element.In case you want to select all
Belements that are children of the element referenced byA_Element, then the call should be: