Fuse IDE
  1. Fuse IDE
  2. ECLIPSE-491

mention in the docs about how folks can test out XPath expressions in Fuse IDE

    Details

    • Type: Documentation Documentation
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 7.1.0
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 7 results 

      Description

      This is probably documented in detail somewhere inside Eclipse itself (we could maybe link to its docs if we can find it in the standard eclipse help) but XPath is a common expression in Camel EIPs. e.g. a Filter or Content Based Router often uses XPath as the expression language.

      Fuse IDE ships wiht an XPath view which helps evaluate Xpath expressions to see what matches etc.

      You can test out XPath expressions on XML documents in Fuse IDE. Open some XML file in Fuse IDE (using the XML editor; e.g. on an XML file it should open in the XML editor or right click -> Open With -> XML Editor). then pull down menu Window -> Show View -> XML -> XPath and you get an XPath selector that lets you try out XPath expressions to see what it matches

      Incidentally a common gotcha with XPath and XML is namespaces which it might be worth describing too; basically if a document uses an xml namespace (with prefix or no prefix)

      e.g.
      http://stackoverflow.com/questions/6390339/how-to-query-xml-using-namespaces-in-java-with-xpath

      this xpath won't match any <foo> elements if the XML has a xmlns="something" statement (since all elements are not in the default namespace)...

      /foo

      (which means "foo" local name in no namespace URI) you must use

      /*[local-name() = 'foo']

      to be namespace URI agnositc

      Or map a prefix...

      /x:foo

        Activity

        Hide
        Jane Murphey
        added a comment -

        Closing because we don't document Eclipse or 3rd party products.

        Show
        Jane Murphey
        added a comment - Closing because we don't document Eclipse or 3rd party products.

          People

          • Assignee:
            Jane Murphey
            Reporter:
            James Strachan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: