Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8270251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:31:41+00:00 2026-06-08T06:31:41+00:00

<DataSet xmlns=http://www.atcomp.cz/webservices> <xs:schema xmlns= xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:msdata=urn:schemas-microsoft-com:xml-msdata id=file_mame>…</xs:schema> <diffgr:diffgram xmlns:msdata=urn:schemas-microsoft-com:xml-msdata xmlns:diffgr=urn:schemas-microsoft-com:xml-diffgram-v1> <alldata xmlns=> <category diffgr:id=category1

  • 0
<DataSet xmlns="http://www.atcomp.cz/webservices">
  <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="file_mame">...</xs:schema>
  <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <alldata xmlns="">
      <category diffgr:id="category1" msdata:rowOrder="0">
        <category_code>P.../category_code>
        <category_name>...</category_name>
        <subcategory diffgr:id="subcategory1" msdata:rowOrder="0">
          <category_code>...</category_code>
          <subcategory_code>...</subcategory_code>
          <subcategory_name>...</subcategory_name>
        </subcategory>
....

How can I obtain all categories and subcategories data?

I am trying something like:

reader.xpath('//DataSet/diffgr:diffgram/alldata').each do |node|

But this gives me:

undefined method `xpath' for #<Nokogiri::XML::Reader:0x000001021d1750>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:31:42+00:00Added an answer on June 8, 2026 at 6:31 am

    Nokogiri’s Reader parser does not support XPath. Try using Nokogiri’s in-memory Document parser instead.

    On another note, to query xpath namespaces, you need to provide a namespace mapping, like this:

    doc = Nokogiri::XML(my_document_string_or_io)
    
    namespaces = { 
      'default' => 'http://www.atcomp.cz/webservices', 
      'diffgr' => 'urn:schemas-microsoft-com:xml-diffgram-v1' 
    }
    doc.xpath('//default:DataSet/diffgr:diffgram/alldata', namespaces).each do |node|
      # ...
    end
    

    Or you can remove the namespaces:

    doc.remove_namespaces!
    doc.xpath('//DataSet/diffgram/alldata').each { |node|  }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this XSLT document : <xsl:stylesheet version=1.0 xmlns:mstns=http://www.w3.org/2001/XMLSchema xmlns=http://www.w3.org/2001/XMLSchema xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:msdata=urn:schemas-microsoft-com:xml-msdata xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output
It all about a typed Dataset... The 'urn:schemas-microsoft-com:xml-msdatasource:DataSetUISetting' element is not declared <?xml version=1.0
I've a SOAP response in a var $soap_response like this: <SOAP-ENV:Envelope SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema
I've got the following chunk of XML data: <ArrayOfRESTDataSource xmlns=http://SwitchKing.Common/Entities/RESTSimplified/2010/07 xmlns:i=http://www.w3.org/2001/XMLSchema-instance> <RESTDataSource> <Description>MyTest</Description> <Enabled>true</Enabled>
I have the following XML <?xml version=1.0 encoding=UTF-8 ?> <GovTalkMessage xsi:schemaLocation=http://www.govtalk.gov.uk/CM/envelope http://xmlgw.companieshouse.gov.uk/v1-0/schema/Egov_ch-v2-0.xsd xmlns=http://www.govtalk.gov.uk/CM/envelope xmlns:dsig=http://www.w3.org/2000/09/xmldsig#
I want to add an XML schema(Main.xsd) to a dataset which includes another schema(base.xsd)
Dataset extends ArrayList. Dataset<Pair<SRGB>> data = new Dataset<Pair<SRGB>>(); Statement stmt = this.conn.createStatement(); ResultSet rs
dataset allows us to do: x = rand(10, 1); y = rand(10, 1); d
[...] public DataSet ReturnPromoMagazinesDs() { MySql.Data.MySqlClient.MySqlConnection mysqlConnection = new MySql.Data.MySqlClient.MySqlConnection(this.connectionString); MySql.Data.MySqlClient.MySqlCommand mysqlCommand = new
I have a dataset with ~20M rows and I'm observing the following behavior. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.