Menu

#606 Documentation: add examples of queries made using `XPATH`

open
nobody
2021-08-07
2021-03-31
Anonymous
No

Originally created by: ngirard

Unless I missed something, the documentation doesn't explain how to query document metadata (searching "site:montferret.dev metadata" through Google returned nothing, neither did grepping the source code).

As an example, I tried to query the og:url metadata.
I tried variations of //meta[property='og:url']::attr(content), with or without the leading //, and with or without the attr(content), but was unsuccessful.

Cheers

Discussion

  • Anonymous

    Anonymous - 2021-03-31

    Originally posted by: ziflex

    Try to use XPATH function for that.

     
  • Anonymous

    Anonymous - 2021-03-31

    Originally posted by: ngirard

    Thank you for your help !
    It might be worth adding examples of queries made using XPATH in the docs, IMHO.
    Feel free to close this issue whenever you want.

     
  • Anonymous

    Anonymous - 2021-08-07

    Originally posted by: suntong

    Yeah, examples of queries made using XPATH would be super, whether in the doc or the cookbook.

     

Log in to post a comment.

MongoDB Logo MongoDB