BookmarkSubscribeRSS Feed
HeatherL_Edwards
Calcite | Level 5

Hi.

In categorizer rules, we can query by XML elements (_Title:"sample") and attributes within specified elements (_Occurrence\Id="sample":1), but not by xpath.  Since our XML schema reuses certain common element names and attributes in multiple locations, specifying the full xpath is essential for many of our queries.  Does anyone know whether xpath search is available in newer versions?  We are using a very old version of Content Categorizer (actually tk240). 

Thanks.

Heather.

1 REPLY 1
JustinPlumley
SAS Employee

Hi Heather,

Yes, Enterprise Content Categorization now supports XPath functionality.  So if you have, say, an xml document that looks like:

...

<article>

<body>         Here is where we talk about Bill Nye.   </body>

<body>         Here is another part of the body where we talk about Bill Cosby.   </body>

<title>Title</title>

</article>

Then there are multiple body elements.  Let's say you want to match the name 'Bill' - but only in the second body element.  Then we can use a rule of the form:

(OR, _/article/body[2]:"_c{Bill}")

which will not match Bill Nye but will match Bill Cosby.

Hope this helps.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 966 views
  • 3 likes
  • 2 in conversation