Le Mon, 29 Feb 2016 15:10:49 +0100, KKing <kicking...@gmail.com> a écrit:
> On 17/02/16 09:15, KKing wrote: >> does the XML component support a GetSingleNode method or allow an >> XPath to be used to obtain single nodes? >> - - - - >> > is that a no then? > > At the moment, there is no XPath support for the gb.xml component. However, if you want to select specific nodes, you have several methods at your disposal : * The XmlElement.GetChildrenByTagName()[0] can be used to search elements with specific tag names, but it also supports LIKE[1] patterns. It can also receive a depth parameter if you want to restrict your search; * The XmlElement.GetChildrenByAttributeValue()[2] works with similar options; * The gb.xml.html sub-component adds a XmlElement.GetChildrenByFilter()[3] method, to which you can pass a CSS filter. Not all CSS expressions are supported though (see the MatchFilter()[4] help). Hope that helps, [0] http://gambaswiki.org/wiki/comp/gb.xml/xmlelement/getchildrenbytagname [1] http://gambaswiki.org/wiki/lang/like [2] http://gambaswiki.org/wiki/comp/gb.xml/xmlelement/getchildrenbyattributevalue [3] http://gambaswiki.org/wiki/comp/gb.xml.html/xmlelement/getchildrenbyfilter [4] http://gambaswiki.org/wiki/comp/gb.xml.html/xmlelement/matchfilter -- Adrien Prokopowicz ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user