I have an xml structure in an existing SQL Server 2005 database table with a particular namespace defined, I need to query out the XML and in the process, change the namespace prefix to become the default namespace. The old xml has the namespace defined on the root node and child nodes and I know how to replace the root easily enough, bu...
I'm trying to extract monetary sums stored in some poorly formated xml columns (there is no schema defined for the XML column which I guess is part of the problem). I'm getting a conversion error whenever I encounter a node with 0 as its value.
Example:
select xml.value('sum(/List/value)', 'numeric') sum
from (select cast('<List><value...
I'm using Saxon 9 to analyze invalid html sources. Specifically the html has href values like the following:
<a href="blah.asp?fn=view&g_varID=1234">some text</a>
I'm getting errors:
"Error reported by XML parser: The reference to entity "g_varID" must end with
the ';' delimiter."
The xml parser is reading the "&g_varID" string and...
In xquery, is there any difference between single and double quotes?
...
What is the difference between XPath, Xquery and Xpointer? As far as my knowledge, xquery is extended version of Xpath. I have the basic knowledge of XPath. Is there any feature available in XPAth which is not in XQuery. Yesterday, i heard a new word "Xpointer". I am confused. Which product is used for which purpose.
...
I'm trying to look at using types to select elements that are subtypes, so I have a test document with subtypes of xs:integer and xs:float.
How do I tell XQuery to use the types defined in my schema?
(It might be relevant that I'm using oXygen and Saxon-SA)
Input document:
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http:...
I've got a very large xml data set that is structured like the following:
<root>
<person>
<personid>HH3269732</personid>
<firstname>John</firstname>
<lastname>Smith</lastname>
<entertime>01/02/2008 10:15</entertime>
<leavetime>01/02/2008 11:45</leavetime>
<entertime>03/01/2008 08:00</e...
Given the following XML variable, how can I replace "UNKNOWN" in the StateCode node with "FOO" in TSQL for MS SQL 2005?
declare @xmldata xml
set @xmldata =
'<Collection>
<Plan>
<StateCode>UNKNOWN</StateCode>
<Type>Tubular</Type>
</Plan>
</Collection>'
Unlike a similar question that I found, this is si...
I am creating very simple CMS for my organisation.
My strategy is to embed editable content between tags called < editable >. However to hide these from the browser I am commenting them out. So an example of an editable region will look like this.
<!-- <editable name="news_item> Today's news is ... </editable> -->
With the content "T...
Consider the following code which checks for an empty date:
declare xqse function tns:isEmptyDate($dob as xs:date) as xs:boolean {
if(empty($dob)) then {
}
}
When executed, why do I get the below error in ALDSP:
weblogic.xml.query.exceptions.XQueryDynamicException: {err}XP0021: "": can not cast to {http://www.w3.org/2001/X...
I have:
a table with an xml type column (list of IDs)
an xml type parameter (also list of IDs)
What is the best way to remove nodes from the column that match the nodes in the parameter, while leaving any unmatched nodes untouched?
e.g.
declare @table table (
[column] xml
)
insert @table ([column]) values ('<r><i>1</i><i>2</i>...
Hi guys,
Can someone give an example of an html page that uses xquery, do you need something else in order to run xquery.
I tried to run some xquery code from w3schools but it is not evaluating in the html page.
<html>
<ul>
{
for $x in doc("books.xml")/bookstore/book/title
order by $x
return <li>{$x}</li>
}
<...
Hi,
I want to use the Saxon-B XQuery class in my ASP.Net website. But my hosting-provider supports only applications in Medium trust level.
Does someone know if it's possible to use Saxon-B and IKVM.Net in a medium trust level environment?
Or is there a good alternative XQuery engine for a ASP.Net application in a medium trust level e...
How can I find the order of nodes in an XML document?
What I have is a document like this:
<value code="1">
<value code="11">
<value code="111"/>
</value>
<value code="12">
<value code="121">
<value code="1211"/>
<value code="1212"/>
</value>
</value>
</value>
and I'm tr...
I'm using the XQDT (XQuery Development Tools) plugin for Eclipse, and I'd like to view query results in Eclipse's graphical XML editor rather than in the console. Does anyone know of a way to redirect output in this way?
...
I have an XML document that contains the following
...
<foo>abc</foo>
...
If I evaluate
return $xml//foo
I get back
<foo>abc</foo>
Is there any way to get just abc instead?
...
I'm using Eclipse's XQDT with Zorba 0.9.5. I'm trying to call the Zorba internal function zorba:print(...) from within a FLWOR expression, but it gets ignored.
Specifically, I'm doing something like the following
import module namespace zorba =
"http://www.zorba-xquery.com/zorba/internal-functions";
for $l in list
let $bar :=...
I'm using eXist for a project at work, and I've run into a problem that I can't seem to figure out a solution for.
I have an xquery script that is updating an existing document that is already in the database. Part of the data that needs to be updated contains HTML, specifically <p> and </p> tags. I cannot get eXist/XQuery to stop esc...
So I have an XQuery that looks something like this:
for $i in /*:rootElement
where $i/*:field = "test"
return $i
This query returns a lot of results, but I only really need one. How can I return just the first item in the result sequence?
...
I am trying to connect to Thomson Reuters Researcher ID service using XRPC.
My questions are as follows:
1) What is XRPC?
2) What do I need to do to send the appropriate data
...