All Questions
1,070
questions
0
votes
1
answer
42
views
fn:parse-json and NUL bytes in XPath
I know that XML doesn't allow NUL bytes in it, but I though that it would somehow work with JSON:
parse-json("""\u0000""") => serialize(map{"method": "...
0
votes
1
answer
42
views
replace strings in arbitrarily nested maps/arrays with XQuery/XPath 3.1
I have a map parsed from a JSON file, for example:
let $template := map{
"name" : "{{name}}",
"aggregateRating": map{
"ratingValue": "{{...
0
votes
1
answer
42
views
Is it safe to define a variable and use it in an other `:=` before the `return`?
I remember reading somewhere that XPath could potentially process the components of an expression in //; so my question is: Can I define a variable and use it in an other variable definition of the ...
0
votes
1
answer
60
views
Can I create an XPATH expression in Notepad++ with results I can paste into a spreadsheet?
Here is my source xml
<?xml version="1.0" encoding="UTF-8"?>
<file>
<Dog ID="Rover" Breed="Sheep Dog">
<feature name="...
0
votes
1
answer
37
views
XPath and XQuery Equivalency
I'm doing some self-study and came across this answer to a problem that I cannot understand.
Given the following DTD:
<!DOCTYPE Courses [
<!ELEMENT Courses (Course*)>
<!ELEMENT ...
0
votes
1
answer
40
views
XQuery to select element with multiple children containing same attribute value
I need to perform a query on a XML document base to find records having multiple elements with very specific items. In SQL I would use GROUP BY, WHERE and HAVING.
I want to select Lorem if it has &...
1
vote
1
answer
45
views
Returning matching attribute value from xpath sequence
I am trying to get an attribute value from the list of values returned by the below query :-
xquery version "1.0-ml";
let $bkp_location := xdmp:filesystem-directory("/etc/")//dir:...
0
votes
1
answer
35
views
XQuery Pull Data in Attribute
I have this query
;WITH XMLNAMESPACES ('http://schemas.microsoft.com/sqlserver/DMF/2007/08'AS DMF)
SELECT
Res.Expr.value('(../DMF:ResultDetail/Operator/Attribute/@ResultValue)[1]', ...
0
votes
1
answer
78
views
XML - How can I display last names that pull from a data feed that starts with an uppercase or lowercase letter in the same area?
I am very new in my role with no XML experience at all, and we are encountering a problem with our employee directory where someone's last name starts with a lowercase letter, and is not being ...
0
votes
1
answer
41
views
XPath / XSLT OR XQuery for grouping data
I have an input xml, as mentioned below.
<root>
<Response_Data>
<Worker>
<Worker_Data>
<Worker_ID>100</Worker_ID>
...
1
vote
1
answer
39
views
Need XPath to extract and rearrange data
I am trying to extract the data from xml document but I am failing to do it correctly.
Below is the sample xml data from which I need specific string details .
XML file
<BESAPI xmlns:xsi="http:...
0
votes
3
answers
108
views
XmlDocument Parse scientific notation in xpath attribute value to a number
I have XML where the values are saved in scientific notation and I need to preform some comparisons on that value . But the scientific notation numbers are not working as expected.
Below is the code I ...
1
vote
1
answer
113
views
How is an empty XML element represented?
Let's say I have the following XML:
<Person>
<Name>Tom</Name>
<Age/>
</Person>
Is the correct representation of the Age value the empty string, '' or a null ...
0
votes
2
answers
73
views
Possible types in xml/xpath
Is an xml value by definition a string, or is any interpretation ever done (ignoring xsd types or something such as xs:element)? For example:
<Values>
<String>hi</String>
<...
1
vote
3
answers
371
views
XPath to match all elements in an array
I am trying to write a condition that applies if an element contains all the attributes in a predefined list but I can not seem to get the XPath correct.
Example data:
let $element := <country type=...