nokogiri
How to check during Nokogiri/Ruby parsing if element exists on page?
how can I check during parsing of an HTML page with Nokogiri (Ruby gem) if an element, in this case a div, exists on the page?[详细]
2023-03-26 08:45 分类:问答Nokogiri -- preserve doctype and meta tags
I\'m using nokogiri to open an existing html file that looks like this: <?xml version=\"1.0\" encoding=\"UTF-8\"?>[详细]
2023-03-25 16:40 分类:问答Some weird problem with Nokogiri's xpath method
doc.xpath(\'//img\') #this will get some results doc.xpath(\'//img[@class=\"productImage\"]\') #and this gets nothing at all[详细]
2023-03-25 02:02 分类:问答ruby search for name and value in nokogiri object
The code bel开发者_高级运维ow will get me all nodes with name=visible, like this node: <property name=\"visible\" value=\"false\"/>[详细]
2023-03-25 01:08 分类:问答How to search by attribute value
I have the following XML doc: <files> <elements xsi:type=\"foo:elementType1\"> <name>foo1</name>[详细]
2023-03-24 16:24 分类:问答How to extract text from a node but not from its children
I\'m trying to parse this fragment with nokogiri from a page(so named a var) that contains ... <dd>[详细]
2023-03-24 16:09 分类:问答How to save unescaped & in nokogiri xml?
How can I save & in the final xml file using nokogiri? My code is like: require \'rubygems\' require \'nokogiri\'[详细]
2023-03-24 05:33 分类:问答Getting all the domains a page depends on using Nokogiri
I\'m trying to get all of the domains / ip addresses that a particular page depends on using Nokogiri. It can\'t be perfect because of Javascript dynamically loading dependencies but I\'m happy with a[详细]
2023-03-24 00:25 分类:问答How can I get the value from the XML content below?
How to get the value of the title tag? <?xml version=\"1.0\" encoding=开发者_如何转开发\"UTF-8\"?>[详细]
2023-03-23 13:25 分类:问答Nokogiri unescaped html
I am parsing HTML text using nokogiri and making some changes to that HTML. doc = Nokogiri::HTML.parse(html_code)[详细]
2023-03-23 10:20 分类:问答