XMLNode.getChildFrom(path)

Returns first XML node matching given path. The following example shows how to get the first child of a node by using the present method, that respond to a certain path. xmlFileContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><invoice><customer>John Doe<address>Park Ave. 2039 NY</address><address>St.Peter Blvd. 3920 CA</address></customer><date>May 26, 2005</date><date>May 27, 2005</date><serviceDescription>SOME SERVICE</serviceDescription><serviceAmmount>1000.0</serviceAmmount><taxes IVA=\"21%\">210.0</taxes><total>1210.0</total></invoice>" xmlDoc = XMLDocument.create(content : xmlFileContent) display xmlDoc.print() xmlNodeRoot = rootFor(xmlDoc) display xmlNodeRoot.tag xmlNode = xmlNodeRoot.getChildFrom("customer") display xmlNode.text xmlNode6 = getChildFrom(xmlNode, path : "address") display xmlNode6.text

Arguments:

Name Type Description Mode
path String path of tags to node in