Possible Answers

Topic Xpath Parsing Question

You may need to log in to view this topic.

Xpath Parsing Question
Posted on Jun 20, 2016
 

I am trying to write a system to read the supplemental info for an event and write the records into the event comments. I have not been able to determine how to write the xpath language to check if the field is blank. What I encountering is that if the previous record had a value in a field and the following record had no information in the same field, the previous value is being written into the field for that record and any subsequent record added to the event. I attached a screen shot of the supplemental info screen with an example.

The OLN field for the first record would be written into the OLN field for every following record in the series if the OLN field was empty. My XPath statement for the OLN field is /IFCADCustomReport/Body/Results/Row/oln. I have not able to find a solution searching on line.

Any assistance would be appreciated.

Thanks,

Bruce Cunningham

Gallatin County 911

Bozeman, MT


The Following Answers May Help to Solve This Question
  Results
Discussion RE: Xpath Parsing Question
Discussion RE: Xpath Parsing Question
Discussion RE: Xpath Parsing Question
Discussion RE: Xpath Parsing Question
Instead, sometimes the tags are removed (not present; not empty; simply not included). This will lead to the XPath parsing challenge you mention where the previous row's value for that Field will be included as the value for the current Field (as you mentioned in your post).
Discussion RE: Xpath Parsing Question
Thanks for the suggestion, it resolved my problem with parsing out the xml with varying attributes in a row. I have an example below:
Discussion Xpath Parsing Question
I am trying to write a system to read the supplemental info for an event and write the records into the event comments. I have not been able to determine how to write the xpath language to check if the field is blank.
Discussion RE: Xpath Parsing Question
A bit more information: The system I am trying to write would read the perso table when a Law Enforcment event is closed then write the perso rows linked to the event into the event remarks. I am using an IFCADSQLSelect to read the perso table then parse out the rows in the IFCADCustomReport into a series. Evidently, if the field in the CAD perso record is null, the value is not written into the XML report for the record.