Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:

Hi, just a small question.

When extracting XML, which is the best way to do it? Xpath or Dom? Can I do both? I just want to know which one will be the best in a Working Environment?

Thanks
Posted
Updated 25-Nov-09 5:34am
v4

I'd say XPath works for simple scenarios, but can get complex. Just go with XPath if it's simple, as it has a very concise syntax. But if things start to get complicated, don't waste your time learning the finer details of XPath.

That being said, there are of course different scenarios where the complicated features of XPath make perfect sense. This question is really too broad to answer definitively.
 
Share this answer
 

I assume this is a joke question, left over from the beta ? XPath is the language used to define nodes when querying them using the DOM.  You MAY be able to use XPath in other situations, but XPath alone is useless, the DOM is what interprets XPath and returns nodes using it.

 
Share this answer
 
<snip English only please>
<deleted>
 
Share this answer
 
v2
<snip English only please>
<deleted>
 
Share this answer
 
v2
<snip English only please>
<deleted>
 
Share this answer
 
v2
<snip English only please>
<deleted>
 
Share this answer
 
v3
Huh ?

What is going on here?
 
Share this answer
 
Sorry I didnt know it can only be in English...

Wont do it again.
 
Share this answer
 
Sorry but how do i delete my answers?

It says deleted but stays here?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900