sql query result - formated xml from mysql database
Thursday, 15 November 2012 · 3 messages
JK
Jarosław Kowalewski15 Nov 2012 11:30 #
Hi,
I've in my mysql database field with xml (formated xml). By using sql module i get something like that:
<sql:column xmlns:sql="http://basex.org/modules/sql" name="xml">
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="wniosek.xsd"></Document>
and I can't query it like regular xml by xquery. It's possible to get only content of xml column? Or it's other way to query this content?
Jarek
FE
Fabrice Etanchaud15 Nov 2012 11:41 #
Hello,
Maybe you should call
fn:parse-xml() in order to get a node from your result 'xml' string.
Advice : PostgreSQL does support XML type, MySQL does not.
If your project is in early stage, you should consider switching RDBMS.
Regards
Fabrice Etanchaud
Questel-Orbit
-----Message d'origine-----Quoted text · Jaroslaw Kowalewski · 14 lines
De : basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de Jaroslaw Kowalewski Envoyé : jeudi 15 novembre 2012 11:31 À : BaseX-Talk at mailman.uni-konstanz.de Objet : [basex-talk] sql query result - formated xml from mysql database Hi, I've in my mysql database field with xml (formated xml). By using sql module i get something like that: <sql:column xmlns:sql="http://basex.org/modules/sql" name="xml"> <?xml version="1.0" encoding="UTF-8"?> <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="wniosek.xsd"> </Document> and I can't query it like regular xml by xquery. It's possible to get only content of xml column? Or it's other way to query this content? Jarek BaseX-Talk mailing list BaseX-Talk at mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
JK
Jarosław Kowalewski15 Nov 2012 12:40 #
Thanks a lot for help. I have to read documentation careful:)
Thanks for advice, but we use mysql for a few years and it's not possible to change it. But I want to use BaseX as flexible tool for reporting with very nice xquery3.0.
Jarek
2012/11/15 Fabrice Etanchaud <fetanchaud at questel.com>:
Quoted text · Fabrice Etanchaud · 33 lines
> Hello, > Maybe you should call fn:parse-xml() in order to get a node from your result 'xml' string. > > > Advice : PostgreSQL does support XML type, MySQL does not. > If your project is in early stage, you should consider switching RDBMS. > > Regards > Fabrice Etanchaud > Questel-Orbit > > -----Message d'origine----- > De : basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de Jaroslaw Kowalewski > Envoyé : jeudi 15 novembre 2012 11:31 > À : BaseX-Talk at mailman.uni-konstanz.de > Objet : [basex-talk] sql query result - formated xml from mysql database > > Hi, > > I've in my mysql database field with xml (formated xml). By using sql module i get something like that: > > <sql:column xmlns:sql="http://basex.org/modules/sql" name="xml"> <?xml version="1.0" encoding="UTF-8"?> <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="wniosek.xsd"> > > </Document> > > and I can't query it like regular xml by xquery. It's possible to get only content of xml column? Or it's other way to query this content? > > Jarek > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Written for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery