• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAVA & XPath

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, currently I am in need of developing some servlets I want to complete a webpage I have to present to the university.
However, since the DB struct came to be TOO complex, I though to place some parts in xml.

Fact is that internet resources, are limited only in how to access xml elements using xpath.
What I want is to create/destroy nodes, edit/insert/delete/update data and hopefully some securite informations. Hopefully...

Relax, I won't ask for all of the above, I just want to ask for resources of where I can find out more about these. Ideally I would prefer a good book. I saw many but honestly there is no way to telling which one covers XPath and which uses DOM.

Any suggestions would be MUCH appreciates.
Tnx in advance guys!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You moved info from a DB to XML to decrease complexity? Really?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In any case, dealing with XML in servlet is no different tan anywhere else so I've moved this off to a more appropriate location.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

konstantinos marinis wrote:Fact is that internet resources, are limited only in how to access xml elements using xpath.
What I want is to create/destroy nodes, edit/insert/delete/update data and hopefully some securite informations. Hopefully...


Then the first thing you have to learn is that XPath is for finding nodes. It isn't used for creating nodes, destroying nodes, editing data, inserting data, deleting data, or updating data. Just for finding nodes.

Anyway you could have a look at ERH's book "Processing XML with Java". It's a little bit dated but it should get you started.
 
konstantinos marinis
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:
Then the first thing you have to learn is that XPath is for finding nodes. It isn't used for creating nodes, destroying nodes, editing data, inserting data, deleting data, or updating data. Just for finding nodes.



I totally agree, but the matter is after I found the node (with XPath) how can I perform the tasks I need?

Paul Clapham wrote:Anyway you could have a look at ERH's book "Processing XML with Java". It's a little bit dated but it should get you started.



Well, haven't yet started reading it, but a 10-year old book, really? I mean, haven't the specs changed since then? As far as I remember xml used to be at its infancy a decade ago...

Bear Bibeault wrote:You moved info from a DB to XML to decrease complexity? Really?


Hah, yeah! Now instead of a gazillion tables with joins, I was able to put them all in a single xml Can't get any happier than that!!!


 
konstantinos marinis
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.kodejava.org/browse/37.html
http://www.servlets.com/speaking/jdom-javaone.pdf
This is it! Currently the best thing i've found on the net
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Well, haven't yet started reading it, but a 10-year old book, really? I mean, haven't the specs changed since then? As far as I remember xml used to be at its infancy a decade ago...



Actually that book (my copy has 2003 date) is still quite useful. Core functions such as defined in the org.w3c.dom package are still there.

Evolution of XPath, XQuery, etc has proceeded but they still rely on those core functions.

Here is a good staring point to see whats going on in XML related standards.

Bill

 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

konstantinos marinis wrote:Well, haven't yet started reading it, but a 10-year old book, really? I mean, haven't the specs changed since then? As far as I remember xml used to be at its infancy a decade ago...



Not really. That's one of the good things about standards. You don't have to rewrite your programs every four years just because some people thought it would be cool to have new toys.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic