473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

xpath??

Hi,
I am very new to xml. I have a datatable I need to group by and was
suggested that xml and xpath might be the way to go. I converted the
datatable to xml but don't know what to do next. Can anyone point me
to the right direction. This is what I am trying to do:
- have datatable (~300k rows and 5 cols)
- need to group by column1(string catagory) and column2(date)
- display the totals by column1 and column2 in datagrid.

Any help is appreciated.

Thanks.
Nov 12 '05 #1
2 2354
The advice to convert the database to XML was clearly a bad joke. RDBMSes
are best at what they can do best -- work with relational data.

Apart from this, if you cannot reverse your decision and go back, get a good
book on XPath/XSLT like e.g.:

"Beginning XSLT" by Jeni Tennison.

Then read about grouping methods in XSLT -- e.g.:

http://jenitennison.com/xslt/grouping/index.xml
or
http://www.topxml.com/code/default.a...20010129150851
Dimitre Novatchev.
FXSL developer, XML Insider,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html

"luke" <lu*****@yahoo.com> wrote in message
news:87**************************@posting.google.c om...
Hi,
I am very new to xml. I have a datatable I need to group by and was
suggested that xml and xpath might be the way to go. I converted the
datatable to xml but don't know what to do next. Can anyone point me
to the right direction. This is what I am trying to do:
- have datatable (~300k rows and 5 cols)
- need to group by column1(string catagory) and column2(date)
- display the totals by column1 and column2 in datagrid.

Any help is appreciated.

Thanks.

Nov 12 '05 #2
Luke,

I agree with Dimitre, but wanted to clarify. You can't do this in an ADO.NET
datatable in any practical manner. Moving 300,000 rows to your applcation
server or client to perform a summation is a bad idea. This is a job for a
stored procedure or query against your database. Check out the Pivot
options.

--
Kathleen Dollard
Microsoft MVP
Author "Code Generation in Microsoft .NET"
"luke" <lu*****@yahoo.com> wrote in message
news:87**************************@posting.google.c om...
Hi,
I am very new to xml. I have a datatable I need to group by and was
suggested that xml and xpath might be the way to go. I converted the
datatable to xml but don't know what to do next. Can anyone point me
to the right direction. This is what I am trying to do:
- have datatable (~300k rows and 5 cols)
- need to group by column1(string catagory) and column2(date)
- display the totals by column1 and column2 in datagrid.

Any help is appreciated.

Thanks.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
0
by: gael.pegliasco | last post by:
Hi, How are you dear and nice helper :) ? I'm trying to test xpath with this simple program : import xml.dom.minidom from xml.xpath.Context import Context import xml.xpath
4
by: Son KwonNam | last post by:
In XSLT, is this possible to get value from xml using XPath which is in XSLT variable? I mean XPath strings can be dynamic while XSL Transforming. If possible, How?? Because I'm not a...
5
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
9
by: David Thielen | last post by:
Hi; I am sure I am missing something here but I cannot figure it out. Below I have a program and I cannot figure out why the xpath selects that throw an exception fail. From what I know they...
5
by: Gnic | last post by:
Hi , I have an XmlDocument instance, I want to find a node in the xml, but I don't know it's path until runtime, for example <aaa> <bbb name="x"/> <aaa attr="y"> <ccc>sometext</ccc> </aaa>
3
by: werD | last post by:
Hello I have an xml document that im currently using a forward only .net repeater on and using some xpath queries to display the data The xml is quite simple <?xml version="1.0"...
3
by: Jason Mobarak | last post by:
Hello -- I'm attempting to get a handle on how to do xpath queries with System.Xml -- so far the biggest hurdle has been how to deal with a default namespace. If I use the test xml: <?xml...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.