web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Suggested Answer

XML Parsing

(0) ShareShare
ReportReport
Posted on by
Hi Everyone,

I am trying to pass this XML below which comes from the body of a HTTP request in powerautomate cloud. I want whats in AbstractText

<?xml version="1.0" ?>
<!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st January 2024//EN" "https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_240101.dtd">
<PubmedArticleSet>
<PubmedArticle><MedlineCitation Status="MEDLINE" Owner="NLM" IndexingMethod="Automated"><PMID Version="1">36940799</PMID><DateCompleted><Year>2023</Year><Month>05</Month><Day>22</Day></DateCompleted><DateRevised><Year>2023</Year><Month>05</Month><Day>24</Day></DateRevised><Article PubModel="Print-Electronic"><Journal><ISSN IssnType="Electronic">1523-1755</ISSN><JournalIssue CitedMedium="Internet"><Volume>103</Volume><Issue>6</Issue><PubDate><Year>2023</Year><Month>Jun</Month></PubDate></JournalIssue><Title>Kidney international</Title><ISOAbbreviation>Kidney Int</ISOAbbreviation></Journal><ArticleTitle>Proteinuria and hematuria after remission induction are associated with outcome in ANCA-associated vasculitis.</ArticleTitle><Pagination><StartPage>1144</StartPage><EndPage>1155</EndPage><MedlinePgn>1144-1155</MedlinePgn></Pagination><ELocationID EIdType="doi" ValidYN="Y">10.1016/j.kint.2023.02.029</ELocationID><ELocationID EIdType="pii" ValidYN="Y">S0085-2538(23)00168-0</ELocationID><Abstract><AbstractText>In anti-neutrophil cytoplasmic antibody (ANCA)-associated vasculitis (AAV), hematuria and proteinuria are biomarkers reflecting kidney involvement at diagnosis. Yet, the prognostic value of their persistence after immunosuppressive induction therapy, reflecting kidney damage or persistent disease, remains uncertain. To study this, our post hoc analysis included participants of five European randomized clinical trials on AAV (MAINRITSAN, MAINRITSAN2, RITUXVAS, MYCYC, IMPROVE). Urine protein-creatinine ratio (UPCR) and hematuria of spot urine samples collected at the end of induction therapy (four-six months after treatment initiation) were correlated with the occurrence of a combined end point of death and/or kidney failure, or relapses during follow-up. Among 571 patients (59% men, median age 60), 60% had anti-proteinase 3-ANCA and 35% had anti-myeloperoxidase-ANCA, while 77% had kidney involvement. After induction therapy, 157/526 (29.8%) had persistent hematuria and 165/481 (34.3%) had UPCR of 0.05 g/mmol or more. After a median follow-up of 28 months (interquartile range 18-42), and adjustment for age, ANCA type, maintenance therapy, serum creatinine and persistent hematuria after induction, a UPCR of 0.05 g/mmol or more after induction was associated with significant risk of death/kidney failure (adjusted Hazard Ratio [HR] 3.06, 95% confidence interval 1.09-8.59) and kidney relapse (adjusted subdistribution HR 2.22, 1.16-4.24). Persistent hematuria was associated with significant kidney relapse (adjusted subdistribution HR 2.16, 1.13-4.11) but not with relapse affecting any organ nor with death/kidney failure. Thus, in this large cohort of patients with AAV, persistent proteinuria after induction therapy was associated with death/kidney failure and kidney relapse, whereas persistent hematuria was an independent predictor of kidney relapse. Hence, these parameters must be considered to assess long-term kidney prognosis of patients with AAV.</AbstractText><CopyrightInformation>Copyright &#xa9; 2023 International Society of Nephrology. Published by Elsevier Inc. All rights reserved.</CopyrightInformation></Abstract><AuthorList CompleteYN="Y"><Author ValidYN="Y"><LastName>Benichou</LastName><ForeName>Nicolas</ForeName><Initials>N</Initials><AffiliationInfo><Affiliation>Department of Nephrology, H&#xf4;pital Europ&#xe9;en Georges Pompidou, Assistance Publique - H&#xf4;pitaux de Paris, Paris, France; Department of Medicine, Universit&#xe9; de Paris, Paris, France. Electronic address: nico.benichou@gmail.com.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Charles</LastName><ForeName>Pierre</ForeName><Initials>P</Initials><AffiliationInfo><Affiliation>Department of Internal Medicine, Institut Mutualiste Montsouris, Paris, France.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Terrier</LastName><ForeName>Benjamin</ForeName><Initials>B</Initials><AffiliationInfo><Affiliation>Department of Medicine, Universit&#xe9; de Paris, Paris, France; Department of Internal Medicine, National Referral Center for Rare Systemic Autoimmune Diseases, H&#xf4;pital Cochin, Assistance Publique - H&#xf4;pitaux de Paris, Paris, France.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Jones</LastName><ForeName>Rachel B</ForeName><Initials>RB</Initials><AffiliationInfo><Affiliation>Lupus and Vasculitis Clinic, Department of Renal Medicine, Addenbrooke's Hospital, Cambridge, UK; Department of Medicine, University of Cambridge, Cambridge, UK.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Hiemstra</LastName><ForeName>Thomas</ForeName><Initials>T</Initials><AffiliationInfo><Affiliation>Department of Medicine, University of Cambridge, Cambridge, UK.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Mouthon</LastName><ForeName>Luc</ForeName><Initials>L</Initials><AffiliationInfo><Affiliation>Department of Medicine, Universit&#xe9; de Paris, Paris, France; Department of Internal Medicine, National Referral Center for Rare Systemic Autoimmune Diseases, H&#xf4;pital Cochin, Assistance Publique - H&#xf4;pitaux de Paris, Paris, France.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Bajema</LastName><ForeName>Ingeborg</ForeName><Initials>I</Initials><AffiliationInfo><Affiliation>Department of Pathology, Leiden University Medical Center, Leiden, The Netherlands; Department of Pathology and Medical Biology, University of Groningen, University Medical Center Groningen, The Netherlands.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Berden</LastName><ForeName>Annelies</ForeName><Initials>A</Initials><AffiliationInfo><Affiliation>Department of Rheumatology and Clinical Immunology, Maasstad Hospital, Rotterdam, The Netherlands.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Thervet</LastName><ForeName>Eric</ForeName><Initials>E</Initials><AffiliationInfo><Affiliation>Department of Nephrology, H&#xf4;pital Europ&#xe9;en Georges Pompidou, Assistance Publique - H&#xf4;pitaux de Paris, Paris, France; Department of Medicine, Universit&#xe9; de Paris, Paris, France.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Guillevin</LastName><ForeName>Lo&#xef;c</ForeName><Initials>L</Initials><AffiliationInfo><Affiliation>Department of Medicine, Universit&#xe9; de Paris, Paris, France; Department of Internal Medicine, National Referral Center for Rare Systemic Autoimmune Diseases, H&#xf4;pital Cochin, Assistance Publique - H&#xf4;pitaux de Paris, Paris, France.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Jayne</LastName><ForeName>David</ForeName><Initials>D</Initials><AffiliationInfo><Affiliation>Lupus and Vasculitis Clinic, Department of Renal Medicine, Addenbrooke's Hospital, Cambridge, UK; Department of Medicine, University of Cambridge, Cambridge, UK.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><LastName>Karras</LastName><ForeName>Alexandre</ForeName><Initials>A</Initials><AffiliationInfo><Affiliation>Department of Nephrology, H&#xf4;pital Europ&#xe9;en Georges Pompidou, Assistance Publique - H&#xf4;pitaux de Paris, Paris, France; Department of Medicine, Universit&#xe9; de Paris, Paris, France.</Affiliation></AffiliationInfo></Author><Author ValidYN="Y"><CollectiveName>French Vasculitis Study Group (FVSG) and European Vasculitis Society (EUVAS) investigators</CollectiveName></Author></AuthorList><Language>eng</Language><GrantList CompleteYN="Y"><Grant><Agency>CIHR</Agency><Country>Canada</Country></Grant></GrantList><PublicationTypeList><PublicationType UI="D016449">Randomized Controlled Trial</PublicationType><PublicationType UI="D016428">Journal Article</PublicationType><PublicationType UI="D013485">Research Support, Non-U.S. Gov't</PublicationType></PublicationTypeList><ArticleDate DateType="Electronic"><Year>2023</Year><Month>03</Month><Day>20</Day></ArticleDate></Article><MedlineJournalInfo><Country>United States</Country><MedlineTA>Kidney Int</MedlineTA><NlmUniqueID>0323470</NlmUniqueID><ISSNLinking>0085-2538</ISSNLinking></MedlineJournalInfo><ChemicalList><Chemical><RegistryNumber>0</RegistryNumber><NameOfSubstance UI="D019268">Antibodies, Antineutrophil Cytoplasmic</NameOfSubstance></Chemical></ChemicalList><CitationSubset>IM</CitationSubset><MeshHeadingList><MeshHeading><DescriptorName UI="D008297" MajorTopicYN="N">Male</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D006801" MajorTopicYN="N">Humans</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D008875" MajorTopicYN="N">Middle Aged</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D005260" MajorTopicYN="N">Female</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D006417" MajorTopicYN="N">Hematuria</DescriptorName><QualifierName UI="Q000209" MajorTopicYN="N">etiology</QualifierName><QualifierName UI="Q000175" MajorTopicYN="N">diagnosis</QualifierName></MeshHeading><MeshHeading><DescriptorName UI="D019268" MajorTopicYN="N">Antibodies, Antineutrophil Cytoplasmic</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D056648" MajorTopicYN="Y">Anti-Neutrophil Cytoplasmic Antibody-Associated Vasculitis</DescriptorName><QualifierName UI="Q000150" MajorTopicYN="N">complications</QualifierName><QualifierName UI="Q000175" MajorTopicYN="N">diagnosis</QualifierName><QualifierName UI="Q000188" MajorTopicYN="N">drug therapy</QualifierName></MeshHeading><MeshHeading><DescriptorName UI="D011507" MajorTopicYN="N">Proteinuria</DescriptorName><QualifierName UI="Q000209" MajorTopicYN="N">etiology</QualifierName></MeshHeading><MeshHeading><DescriptorName UI="D012074" MajorTopicYN="N">Remission Induction</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D002908" MajorTopicYN="N">Chronic Disease</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D051437" MajorTopicYN="Y">Renal Insufficiency</DescriptorName><QualifierName UI="Q000150" MajorTopicYN="N">complications</QualifierName></MeshHeading><MeshHeading><DescriptorName UI="D012008" MajorTopicYN="N">Recurrence</DescriptorName></MeshHeading><MeshHeading><DescriptorName UI="D012189" MajorTopicYN="N">Retrospective Studies</DescriptorName></MeshHeading></MeshHeadingList><KeywordList Owner="NOTNLM"><Keyword MajorTopicYN="N">ANCA-associated vasculitis</Keyword><Keyword MajorTopicYN="N">chronic kidney disease</Keyword><Keyword MajorTopicYN="N">hematuria</Keyword><Keyword MajorTopicYN="N">kidney failure</Keyword><Keyword MajorTopicYN="N">proteinuria</Keyword><Keyword MajorTopicYN="N">relapse</Keyword></KeywordList></MedlineCitation><PubmedData><History><PubMedPubDate PubStatus="received"><Year>2022</Year><Month>5</Month><Day>9</Day></PubMedPubDate><PubMedPubDate PubStatus="revised"><Year>2023</Year><Month>2</Month><Day>7</Day></PubMedPubDate><PubMedPubDate PubStatus="accepted"><Year>2023</Year><Month>2</Month><Day>16</Day></PubMedPubDate><PubMedPubDate PubStatus="medline"><Year>2023</Year><Month>5</Month><Day>22</Day><Hour>6</Hour><Minute>42</Minute></PubMedPubDate><PubMedPubDate PubStatus="pubmed"><Year>2023</Year><Month>3</Month><Day>21</Day><Hour>6</Hour><Minute>0</Minute></PubMedPubDate><PubMedPubDate PubStatus="entrez"><Year>2023</Year><Month>3</Month><Day>20</Day><Hour>20</Hour><Minute>22</Minute></PubMedPubDate></History><PublicationStatus>ppublish</PublicationStatus><ArticleIdList><ArticleId IdType="pubmed">36940799</ArticleId><ArticleId IdType="doi">10.1016/j.kint.2023.02.029</ArticleId><ArticleId IdType="pii">S0085-2538(23)00168-0</ArticleId></ArticleIdList></PubmedData></PubmedArticle></PubmedArticleSet>



I've checked whether it is valid - and it is.

I have been using an xpath function within a Compose as below

xpath(xml(body('Get_Abstract')),'//AbstractText/text()')


However, the error I am getting is

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'xpath' failed to parse the provided XML.'.

So i'm at a loss. For futher context i'm querying the NCBI API with efetch from eutils.ncbi.nlm.nih.gov

Any help would be appreciated
Categories:
I have the same question (0)
  • Suggested answer
    SamLed Profile Picture
    2,338 Moderator on at
    Hi,
     
    Ibendlin got it, replace your expression: 
     
    xpath(xml(body('Get_Abstract')),'//AbstractText/text()')
     
    by:
     
    xpath(xml(join(skip(split(body('Get_Abstract'), decodeUriComponent('%0A')), 2),'')),'//AbstractText/text()')
     
    It will split by 'New line", skip 2 first items from resulting array (which means ignoring the 2 first lines), join back all remaining lines, convert resulting string to xml and finally apply your XPATH query.
     
    __________________________________________________________________________________________________
    If this is the answer for your question, please mark the post as Accepted Answer.
    If this answer helps you in any way, please give it a like.
     
  • lbendlin Profile Picture
    8,540 Super User 2025 Season 2 on at
    Apparently it doesn't like the 
     
    <!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st January 2024//EN" "https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_240101.dtd">
     
    reference.  If you remove that then the parsing works.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 190 Super User 2025 Season 2

Last 30 days Overall leaderboard