Handle empty node in XPATH for xml filter


(Ritesh) #1

Hi All

I have a XML file with 100 records, in one of the record the xml node is missing as the value is not available in system

The xml path is like this

/Envelope/Body/response/table/row/description/text

in other record the path is until here`

/Envelope/Body/response/table/row/description

The node is missing as there is no value

How can we define the XPATH for such situation

  xpath => [
        "/Envelope/Body/response/table/row/description/text()","description",		
        ]

(Ritesh) #2

Can we apply if condition, i want to execute XPATH if the node/tag is available and supply a text "null" if it is not available


(Ritesh) #3

Please let me know, if this feature is not supported with XPATH of xml filter.
Did anyone faced this issue?


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.