Click on xml text : See xpath expression

Discussion in 'XML' started by gimme_this_gimme_that@yahoo.com, Apr 20, 2005.

  1. Guest

    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.
     
    , Apr 20, 2005
    #1
    1. Advertising

  2. Romin Guest

    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.
     
    Romin, Apr 20, 2005
    #2
    1. Advertising

  3. <> wrote in message
    news:...
    >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.
     
    Dimitre Novatchev, Apr 20, 2005
    #3
  4. Romin Guest

    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.

    Dimitre Novatchev wrote:
    > <> wrote in message
    > news:...
    > >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.
     
    Romin, Apr 20, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Flip
    Replies:
    3
    Views:
    985
    Tony Morris
    Feb 9, 2004
  2. Marvin_123456

    "Memory leak" in javax.xml.xpath.XPath

    Marvin_123456, Jul 29, 2005, in forum: Java
    Replies:
    4
    Views:
    1,996
    jan V
    Jul 29, 2005
  3. GIMME
    Replies:
    3
    Views:
    12,001
    vforvikash
    Dec 29, 2008
  4. Steve Kershaw
    Replies:
    1
    Views:
    373
    Brennan Stehling
    Sep 26, 2006
  5. lxmxn
    Replies:
    2
    Views:
    371
    ggrothendieck
    May 3, 2008
Loading...

Share This Page