Click on xml text : See xpath expression

  • Thread starter gimme_this_gimme_that
  • Start date
G

gimme_this_gimme_that

I once downloaded a shareware program that allowed you
to open an xml file, click on a text or an attribute,
an then see the xpath expression that would fetch
that data.

The program didn't require that you enter the xpath
expression.

It may have been something that worked from opening
a page in IE. That would be OK. It could have been
the Xpath Visualizer, but the version I experimented
with today required that you enter the xpath expression.

Is this possible in the Xselerator? If so I'm missing how
to do it. It seems to do about what the Viuslalizer does.

What program will help me?

Thanks.
 
R

Romin

I am not aware of Xselerator but I have used XML Spy and Sonic Stylus
Studio to meet my XML needs. Both the programs have the feature that
you are describing: select the XML element - right-click and they
give you the XPath expression.

Evaluation copies are available for both products.
 
D

Dimitre Novatchev

I once downloaded a shareware program that allowed you
to open an xml file, click on a text or an attribute,
an then see the xpath expression that would fetch
that data.


There's nothing like "the xpath expression that would fetch
that data."

For any node there exist many XPath expressions that select it. Therefore
the usefulness of such "feature" will not be too big as its author could not
have guessed in advance what every individual user would need.

An XPath expression may select different nodes (if anything) depending on
the context (such as the current node). Most probably the tools you describe
produce an absolute XPath expression (starting from the root node). Such an
XPath expression may or may not correspond to the user's needs.

This proves that even if a user is shown *an* XPath expression that selects
the node under the mouse pointer, this will not eliminate the need for this
user to write XPath expressions (and to understand XPath).


Cheers,
Dimitre Novatchev.
 
R

Romin

I agree with your post -- very informative. The tools that I have
described provide you with an absolute XPath expression and while it is
common knowledge that are multiple ways to get to the same information
-- this is one way and in fact for someone starting out -- it can be a
good way to learn more.

Romin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,841
Latest member
WilmerBelg

Latest Threads

Top