xquery - Why does my query report "Steps within a path expression must yield nodes"? -
I am relatively new to XQuery and I am using XML with the following format (MODSXML):
& lt ;? Xml version = "1.0" encoding = "UTF-8" standalone = "no"? & Gt; & Lt; ModsCollection xmlns = "http://www.loc.gov/mods/v3" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" XSI: Schema location = "http: // Www .loc.gov / mods / v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd"> & Lt; Mods id = "isi: 000330282600027" version = "3.0" & gt; & Lt; TitleInfo & gt; & Lt; Title & gt; {Minimum Relative Entropy for Quantum Estimation: Feasibility and Common Solution} I am trying to retrieve all the articles in the XML file, the expression I am using is the following:
Archive In $ x ("Explalibibetex") / "QuatumMinamation.xml" / ModsCollection / Mode / TitleInfo / Title Returns & lt; Title & gt; $ X / lesson () & lt; / Title & gt; When I try to run this expression on the basis, I get the following error:
"[XPTY0019] Path within the path expression Nodes should be generated; Xs: string found. "
Can anyone tell me what is wrong? The result I was hoping was a list with all the titles in the document.
The problem is here:
the archive ("ExplalyBibetex") / "QuatumMinamation .xml" / modscion This gives a string with content quantuminformation.xml for each file / root node ExemploBibtex In the archive, and then tries to move an axis on each of these strings - which is not allowed.
It seems that you want ExemploBibtex to access the quantuminformation.xml document within the archive. To open a specific file in a collection, use the following syntax instead:
Archive ("ExpllineBibetax / quantuminformation.xml") / modsCollection I cut the last axis for readability and keep the code lines low; Just add them again, they're fine.
Comments
Post a Comment