Skip to main content
Solved

XMLXQueryExtractor extract Attribute

  • April 4, 2023
  • 2 replies
  • 44 views

jkr_wrk
Influencer
Forum|alt.badge.img+35

I have the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<MyProblem>
<Maat Name="MyName1" Description="LetsDoIt">
<Status_Maat Value="Open"/>
</Maat>
<Maat Name="MyName2">
<Status_Maat Value="Open"/>
</Maat>
<Procon Description="FinalCheck"/>
<Precon Description="StopAndCheck"/>
<Maat Name="MyName3" Description="LetsDoNothing">
<Status_Maat Value="Open"/>
</Maat>
</MyProblem>

I can extract the Maat with XMLXQueryExtrator by the following expression:

/MyProblem/Maat

 

Notepad++ XMLTools says the path to the Description is 

/MyProblem/Maat/@Description 

but this gives an error. And no results.

 

What am I doing wrong?

Best answer by ebygomm

Try

/MyProblem/Maat/@Description/string()

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • April 4, 2023

Try

/MyProblem/Maat/@Description/string()

 


jkr_wrk
Influencer
Forum|alt.badge.img+35
  • Author
  • 424 replies
  • April 4, 2023

Thanks, that worked.