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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 959 views
  • 3 likes
  • 2 in conversation