Uploaded image for project: 'Fuse Tools'
  1. Fuse Tools
  2. FUSETOOLS-491

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

    Details

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

      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

        Gliffy Diagrams

          Activity

          Hide
          jmurphey Jane Murphey added a comment -

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

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: