DOM vs XPath - Difference? -


i'm curious of pros , cons of these two, dom , xpath. xpath provide dom not, , other way around? i'm not looking performance or that, main difference between 2 when comes navigation? when dom better use xpath example?

thanks.

they complementary rather competing. dom provides tree model of xml low-level navigation capability (get first child, next sibling, etc); xpath adds higher-level search , navigation capability (e.g. average price of books, title of last chapter).

note dom 1 tree model xml, , far being best: it's first , worst, , it's shame many people still use it. in java world there better designs available such jdom , xom.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -