This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes How to create a summary for XML data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to create a summary for XML data" Watch "How to create a summary for XML data" New topic
Author

How to create a summary for XML data

Amit Agarwal
Ranch Hand

Joined: May 09, 2001
Posts: 92
Hi,
I have a java program that generates an XML document containing information on various electrical components in a circuit. I want to make a summary of the components in the circuit and display a report. Is this possible using any of the XML technologies or do I have to write a pure java code for this?
-------------
Amit
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
If you know the structure of your XML file, then you can write a stylesheet that includes all the summarizing logic.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Amit Agarwal
Ranch Hand

Joined: May 09, 2001
Posts: 92
Thanks Ajith,
I know the structure of my XML file. I just wanted to know whether it is possible to put a summarizing logic using XSL.
I need to get a sub-total quantity against each category in the summary. is it possible to compute the sub-totals etc. using XSL.
Please tell me any online resources available, which could help me in this. I have seen a tutorial at http://www.w3schools.com/xsl but it does not talk of any type of computations (totals / count).
----------------
Amit
[This message has been edited by Amit Agarwal (edited June 13, 2001).]
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
You can use sum() and count() functions.
These are the best recourses for advanced XSLT:
XSLT Questions and Answers. http://www.dpawson.co.uk/xsl/sect2/sect21.html
Jeni's XSLT Pages: http://www.jenitennison.com/xslt/index.html

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to create a summary for XML data
 
Similar Threads
swing in logic circuit software
Using Java Swing: Which Components to use
Any good overview out there on logical operators precedence?
creating an HTML table with Java
swing in logic circuit software