Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: ECLIPSE-491
Type: Documentation Documentation
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Jane Murphey
Reporter: James Strachan
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Fuse IDE

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

Created: 19/Jan/12 10:25 AM   Updated: 14/Nov/12 01:10 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0


 Description  « Hide
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



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
James Strachan made changes - 19/Jan/12 10:37 AM
Field Original Value New Value
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
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
Eric Johnson made changes - 19/Jan/12 03:45 PM
Assignee Jane Murphey [ jmurphey ]
James Strachan made changes - 23/Jan/12 08:50 AM
Fix Version/s 2.2 [ 11300 ]
Jane Murphey added a comment - 29/Feb/12 10:02 PM
Closing because we don't document Eclipse or 3rd party products.

Jane Murphey made changes - 29/Feb/12 10:02 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Won't Fix [ 2 ]
Lars Heinemann made changes - 19/Oct/12 06:30 AM
Fix Version/s 3.0.0 [ 11910 ]
Fix Version/s 2.2.0 [ 11300 ]
Lars Heinemann made changes - 14/Nov/12 01:10 PM
Fix Version/s 7.1.0 [ 11941 ]
Fix Version/s 3.0.0 [ 11910 ]