AnsweredAssumed Answered

xPath for BE_XPath

Question asked by DanielShanahan on Feb 15, 2016
Latest reply on Feb 18, 2016 by DanielShanahan

I'm trying to get information on text objects from the DDR in .xml.  I think using an XSLT would be the best way to go but the learning curve is steep.  For the moment I'm using the Base Elements plugin, specifically, the BE_XPath ( xml ; xpath {; namespaceList ; asText } ) function.

 

I'm not clear on how to write the second parameter, xpath.  The example on the documentation page is too obscure for me.

 

I'm trying to get the info in the TextObj (see image).  I've tried the following:

FMPReport/File/LayoutCatalog/Layout/Object/TextObj/

/FMPReport/File/LayoutCatalog/Layout/Object/TextObj/

FMPReport/File/LayoutCatalog/Layout/Object/TextObj

/FMPReport/File/LayoutCatalog/Layout/Object/TextObj

/////TextObj/

FMPReport:File:LayoutCatalog:Layout:Object/TextObj

 

Also, I'm presuming that the first parameter - xml - can be reference to an external document.  My calculation looks like this:

 

Let ( [

  _xml = Get ( DesktopPath ) & "InventoryDDR/" & "inventory_fmp12.xml" ;

  _xpath = "FMPReport/File/LayoutCatalog/Layout/Object/TextObj/"

] ;

 

BE_XPath ( _xml ; _xpath )

 

)  // end Let

 

I'd like to be able to grab all the TextObj from all the layouts.  I don't need all the namespaces, so I'd like to use the namespaceList parameter.  But the complexity - at least for me - is such that I thought it best to start simple, so I'm just focused on getting all the data from the TextObj.

 

Here is an image of the .xml with the TextObj highlighted:

TextObj_info.png

 

The calc is in the Data Viewer but doesn't return anything.  Can anyone tell me what I'm doing wrong?

Outcomes