{"id":41,"date":"2003-09-27T17:07:00","date_gmt":"2003-09-27T17:07:00","guid":{"rendered":"http:\/\/jclark.org\/weblog\/XML\/rubyxpath.html"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-30T04:00:00","slug":"rubyxpath","status":"publish","type":"post","link":"https:\/\/jclark.org\/weblog\/2003\/09\/27\/rubyxpath\/","title":{"rendered":"XPath Rocks"},"content":{"rendered":"<p>I&#8217;ve been using <a href=\"http:\/\/www.w3.org\/TR\/xpath\" title=\"XML Path Language (XPath) W3C Recommendation\">XPath<\/a> extensively for a couple of years now.  The Excel templating engine I wrote for work accepts only <span class=\"caps\">XML<\/span> as source data.  XPath is used within the templates to select the elements to insert into the worksheet.  The second version of the engine, which I wrote a year ago, uses even more <span class=\"caps\">XML <\/span>&#8211; templates are now completely described in an <span class=\"caps\">XML<\/span> schema designed for the purpose, and requests from the web server to the reporting servers for report creation are formatted in another <span class=\"caps\">XML<\/span> schema.  Inside the engine, most all manipulation of the various <span class=\"caps\">XML<\/span> bits is done via XPath instead of <span class=\"caps\">DOM<\/span> accessor methods like getElementByName().  <\/p>\n<p><a href=\"http:\/\/www.intertwingly.net\" title=\"Sam Ruby's Weblog\">Sam Ruby<\/a> is currently working with a new weblog system known as <a href=\"http:\/\/www.xmldatabases.org\/WK\/blog\/503?t=item\" title=\"Syncato Weblogging Software\">Syncato<\/a>, which stores entries in an <span class=\"caps\">XML DB <\/span>(among other cool <span class=\"caps\">XML<\/span> features).  Sam has now <a href=\"http:\/\/www.intertwingly.net\/blog\/1601.html\">enabled XPath searches<\/a> of his archives, using the Atom and xhtml namespaces.  Hover the example search links and checkout the search urls.<\/p>\n<p>This is almost reason enough to switch to Syncato immediately.  Add the fact that all presentation is done via <a href=\"http:\/\/www.w3.org\/TR\/xslt\" title=\"XSL Transformations (XSLT) W3C Recommendation\">XSLT<\/a> (another <span class=\"caps\">XML<\/span> technology I love), and the case is quite compelling.<\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been using XPath extensively for a couple of years now. The Excel templating engine I wrote for work accepts only XML as source data. XPath is used within the templates to select the elements to insert into the worksheet. The second version of the engine, which I wrote a year ago, uses even more [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-41","post","type-post","status-publish","format-standard","hentry","category-xml"],"_links":{"self":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":0,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"wp:attachment":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}