XML XPath Query compact framework

P

Philip Gray

Hello all,

Probably a really simple question, but I'm trying to write some code in
VB.net using the compact framework, that will load in SQL statements from an
XML file before passing them to a query processor.

What are the best ways to do this?

I've attached the xml file to give some context. I need a way of xpathing
the relevant sql element out of the XML and returning it as a string. How
are XPath node selections done in the CF? Is it supported in the xmlreader
or xmldocument classes? Help!

Also, if anyone knows a way in which I could use some xsl to transform the
parameter values into the SQL I'd really appreciate hearing it!

Thanks in advance!
 
C

Chris J.T. Auld [MVP]

I've attached the xml file to give some context. I need a way of xpathing
the relevant sql element out of the XML and returning it as a string. How
are XPath node selections done in the CF? Is it supported in the xmlreader
or xmldocument classes? Help!

There is no XPath support on the CF.
Also, if anyone knows a way in which I could use some xsl to transform the
parameter values into the SQL I'd really appreciate hearing it!

I personally use standard text files to hold my SQL DDL for CF use. I then
parse it out and use String.Format() to insert parameters.

Cheers
Chris

--
****Please Reply To The Newsgroup So All Can Benefit From Discussion****
-------------------------------------------
Kognition Consulting Limited - Thought Meets Technology
Chris J.T. Auld - Managing Director
Microsoft MVP (Windows Mobile Devices)
Phone: +64 3 453 0064
Mobile: +64 21 500 239
Email: (e-mail address removed)
 
P

Philip Gray

Thanks Chris - I had a feeling that might be the case... still gutted about
it!

The bottom line is that it now makes more sense for me to hard-code the
queries into the module - exactly the kind of thing I was trying to get away
from!
 
C

Chris J.T. Auld [MVP]

Not necessarily.
It is pretty quick to flick through an XmlNodeList and pick out the correct
one.

--
****Please Reply To The Newsgroup So All Can Benefit From Discussion****
-------------------------------------------
Kognition Consulting Limited - Thought Meets Technology
Chris J.T. Auld - Managing Director
Microsoft MVP (Windows Mobile Devices)
Phone: +64 3 453 0064
Mobile: +64 21 500 239
Email: (e-mail address removed)
 
P

Philip Gray

Absolutely, but I'd completely forgotten how to do that - I've spent so long
using XPath, it seemed like the only way! Got it working on a nodelist now
though and it seems pretty elegant.thanks for the pointers.

I've since found out that XSLT is missing from the CF too and theres no
support for application configuration files either :-(

Is there a complete reference somewhere of what is included in the CF? A
..chm file would be nice - I'm getting hacked off with sifting through
millions of web pages only to find out that a given feature is not
supported?
 
Y

Yechezkal Gutfreund

I found, and bought a XPATH query tool for compact framework for PPC.

It is sold by www.cuesoft.net.

I found it zippy and good enough for what I was doing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top