cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Can I get children of current node by xpath

dbd
1-Newbie
1-Newbie

Can I get children of current node by xpath

I'm trying to get children of current node by using xpath in APP source edit mode!

Can it be done in this way?

ACCEPTED SOLUTION

Accepted Solutions

APP source edit mode = APP Javascript FOM

The way to access the current node during formatting is: formatting.currentXMLNode

Once you have an XML Node object you can run XPath against it: myNode.evaluateXPath("something")

To access child elements in XPath: child::*

So putting it all together: formatting.currentXMLNode.evaluateXPath("child::*")

View solution in original post

3 REPLIES 3

I'm not sure what APP source edit mode is, but there is an acl function:  oid_xpath_nodeset_str(srcOid, xpath)

I use this in conjunction with a helper acl method to make calls from java.

See the archive at:  aclxpathhelperfunction - www2

APP source edit mode = APP Javascript FOM

The way to access the current node during formatting is: formatting.currentXMLNode

Once you have an XML Node object you can run XPath against it: myNode.evaluateXPath("something")

To access child elements in XPath: child::*

So putting it all together: formatting.currentXMLNode.evaluateXPath("child::*")

rdiaz
5-Regular Member
(To:dbd)

Hey dr bd,

Did Gareth's reply help you out?

Let us know if you got it resolved, or need more assistance.  Thanks!

Announcements

Top Tags