SPSS Statistics

 View Only
  • 1.  FootNote attribute not found using spss.EvaluateXPath

    Posted Thu September 17, 2020 01:16 PM
    Hi

    xml_note = """outputTree//category[@text="Pearson Chi-Square"]/dimension/category[@text="Value"]/cell/footnote/note"""
    res_note = spss.EvaluateXPath(handle, "/", xml_note)

    yields an empty string while using the same xml_note expression in XPath Visualizer Tool gives the result shown in the OutputDocument.

    My intention was to read the note saying how many cells there are with expected frequencies < 5.
    As a workaround I produce the actual Chi Square table and have Python count the number of cells with expected frequencies< 5, but I see that as a second best solution.

    I'm using V25.0.0.2, 64 bit.

    Am I mistaken in thinking it's a bug, or am I overlooking something obvious?

    Thanks in advance for responding

    Kees





     



    ------------------------------
    Kees Smit
    ------------------------------

    #SPSSStatistics


  • 2.  RE: FootNote attribute not found using spss.EvaluateXPath

    IBM Champion
    Posted Thu September 17, 2020 02:16 PM
    Never mind.  This xpath expression works.
    xml_note = """//outputTree//category[@text="Pearson Chi-Square"]/dimension[@text="Values"]/category[@text="Value"]/cell/footnote/note/@text"""

    ------------------------------
    Jon Peck
    ------------------------------



  • 3.  RE: FootNote attribute not found using spss.EvaluateXPath

    Posted Fri September 18, 2020 03:09 AM
    Ah, I left out the text attribute. XPath Visualizer Tool doesn't seem to care, but spss.EvaluateXPath does.


    BTW My original expression works too, after appending ../@text


    Thanks a lot!


    Kees

    ------------------------------
    Kees Smit
    ------------------------------