RESTful API 调用返回下面注明的 XML。
我需要为每个 ShowSurveyAnswerKey 循环执行各个步骤。所以在这种情况下,有 8 个。使用以下“应用到每个”步骤表达式即可:
xpath(xml(body('HTTP_Get')),'//ShowSurveyAnswer')
xpath(item(),'string(/ShowSurveyAnswer/@ShowSurveyAnswerKey)')
所以真的,我无法在“应用到每个”中的 Power Automate Compose Expression 中找出父级或祖先或 ../。
非常感谢所有帮助。谢谢!
<?xml version="1.0" encoding="utf-8"?>
<Show ShowKey="123" >
<ShowSurveys>
<ShowSurvey ShowSurveyKey="230151" >
<SurveyQuestions>
<SurveyQuestion ShowSurveyQuestionKey="842125" >
<SurveyAnswers>
<ShowSurveyAnswer ShowSurveyAnswerKey="3316719" />
<ShowSurveyAnswer ShowSurveyAnswerKey="3316720" />
<ShowSurveyAnswer ShowSurveyAnswerKey="3316721" />
</SurveyAnswers>
</SurveyQuestion>
</SurveyQuestions>
</ShowSurvey>
<ShowSurvey ShowSurveyKey="217418" >
<SurveyQuestions>
<SurveyQuestion ShowSurveyQuestionKey="808668" >
<SurveyAnswers>
<ShowSurveyAnswer ShowSurveyAnswerKey="3192170" />
<ShowSurveyAnswer ShowSurveyAnswerKey="3192174" />
</SurveyAnswers>
</SurveyQuestion>
<SurveyQuestion ShowSurveyQuestionKey="808669" >
<SurveyAnswers>
<ShowSurveyAnswer ShowSurveyAnswerKey="3192175" />
<ShowSurveyAnswer ShowSurveyAnswerKey="3192176" />
<ShowSurveyAnswer ShowSurveyAnswerKey="3192177" />
</SurveyAnswers>
</SurveyQuestion>
</SurveyQuestions>
</ShowSurvey>
</ShowSurveys>
</Show>
遇到类似的挑战。你能找到解决办法吗?