nokogiri
Which version of xpath that Nokogiri support?
I can\'t find an official statement of the xpath version that Nokogiri supports. Anyone can help mewith it? In fact I want to extract some elements that have an attribute start with specified sub stri[详细]
2023-03-30 17:22 分类:问答Problem reading XML with Nokogiri
My Ruby script is supposed to read in an XML doc from a URL and check it for well-formedness, returning any errors.I have a sample bad XML document hosted with the following text (from the Nokogiri tu[详细]
2023-03-29 16:07 分类:问答nokogiri excluded elements from select all by class
I\'m just trying to exclude a couple of child elements by class from a selection of all the children of a node[详细]
2023-03-29 11:37 分类:问答How does Nokogiri handle unclosed HTML tags like <br>?
When parsing HTML document, how Nokogiri handle <br> tags? Suppose we have document that looks like this one:[详细]
2023-03-29 01:49 分类:问答Getting attribute's value in Nokogiri to extract link URLs
I have a document which look like this: <div id=\"block\"> <a href=\"http://google.com\">link</a>[详细]
2023-03-28 19:49 分类:问答Delete Nodes from a HTML table using Nokogiri
I have been scratching my head over this for a while. Help me out before I start picking my brain. I have a html document that has an events table which has \'In\' and \'Out\' as part of the columns.[详细]
2023-03-28 16:27 分类:问答How to tidy up malformed xml in ruby
I\'m having issues tidying up malformed XML code I\'m getting back from the SEC\'s edgar database. For some reason they have horribly formed xml.Tags that contain any sort of string aren\'t closed an[详细]
2023-03-28 03:09 分类:问答Efficient way to replace content of a few tags using Nokogiri
I have an RSS document that has a few tags, let\'s say named <foo开发者_C百科> and <bar>, where I want to replace/massage the content. What\'s the most efficient way of doing this? Do I pa[详细]
2023-03-28 02:56 分类:问答Pulling a URL from a feed using Nokogiri
Let\'s say I have this in a document: <entry> <link rel=\"replies\" type=\"application/atom+xml\" href=\"http://www.url.com/feeds/1/comments/default\" title=\"Comments\"/>[详细]
2023-03-27 23:49 分类:问答ruby (1.8.7): How to get rid of non-printable chars while scraping?
I\'m trying to parse an HTML page with Nokogiri but I\'m having some issues with text. Mainly, I cannot get rid of unwanted chars. While parsing, when I obtain a String I always try to clean it as muc[详细]
2023-03-27 05:32 分类:问答