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 819221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:16:25+00:00 2026-05-15T02:16:25+00:00

ref xml doc I want to parse on EACH <HOST> and get the number

  • 0

ref xml doc

I want to parse on EACH <HOST> and get the number of <QID> , along with Values of each

<TYPE> 
<HOST>
  <IP>10.1.3.1</IP>
  <TRACKING_METHOD>IP</TRACKING_METHOD>
  <DNS><![CDATA[.demo.com]]></DNS>
  <OPERATING_SYSTEM><![CDATA[abcd Version 7]]></OPERATING_SYSTEM>
  <ASSET_GROUPS>
    <ASSET_GROUP_TITLE><![CDATA[Demo Lab ]]></ASSET_GROUP_TITLE>
    <ASSET_GROUP_TITLE><![CDATA[Demo Lab cd]]></ASSET_GROUP_TITLE>
  </ASSET_GROUPS>
  <VULN_INFO_LIST>
    <VULN_INFO>
      <QID id="qid_43172">43172</QID>
      <TYPE>Vuln</TYPE>
      <SSL>false</SSL>
      <FIRST_FOUND>2009-10-27T18:38:29Z</FIRST_FOUND>
      <LAST_FOUND>2010-05-10T18:22:11Z</LAST_FOUND>
      <TIMES_FOUND>4</TIMES_FOUND>
      <VULN_STATUS>Active</VULN_STATUS>
    </VULN_INFO>
    <VULN_INFO>
      <QID id="qid_43142">43142</QID>
      <TYPE>Vuln</TYPE>
      <SSL>false</SSL>
      <FIRST_FOUND>2009-05-08T17:41:01Z</FIRST_FOUND>
      <LAST_FOUND>2010-05-10T18:22:11Z</LAST_FOUND>
      <TIMES_FOUND>5</TIMES_FOUND>
      <VULN_STATUS>Active</VULN_STATUS>
    </VULN_INFO>
  </VULN_INFO_LIST>
</HOST>
<HOST>
  • 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-05-15T02:16:26+00:00Added an answer on May 15, 2026 at 2:16 am

    You can use Nokogiri and do something like:

    require 'nokogiri'
    
    xml_string = #load the xml however you want here
    doc = Nokogiri::XML(xml_string)
    
    doc.css("HOST").each do |host|
      puts "host #{host.at_css('IP').text}"
    
      qids = host.css("QID")
      puts "#{qids.length} QIDs"
      qids.each do |qid| 
        puts qid.text
      end
    
      puts "---"
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 523k
  • Answers 523k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer true. They use javascript ( or jquery) to load content… May 16, 2026 at 9:43 pm
  • Editorial Team
    Editorial Team added an answer That is exactly how I would write it. It's simple… May 16, 2026 at 9:43 pm
  • Editorial Team
    Editorial Team added an answer ~/.profile is read when you log in. To use that… May 16, 2026 at 9:43 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

We have an XML file with a very simple implementation of XLink : <root
I am using R 2.11.1 and XML package 3.1-0, and I was going through
I'm trying to query XML through XPATH but is having problem getting id() to
This is part of one of our XML files in SharePoint: <BuildManifest nsprefix =ns0
i have this xml schema <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns=http://hidden/abc xmlns:xs=http://www.w3.org/2001/XMLSchema targetNamespace=http://hidden/abc elementFormDefault=qualified attributeFormDefault=unqualified
Working with spring, below, the code of applicationContext-service.xml: <bean id=mediaObjectService class=path.MediaObjectServiceImpl> <property name=mediaObjectDao >
Here is my situation: I have my mvc-config.xml file for my web service set
I want to create a generalized helper method for LoadFromXML loading and validation. If
I am new to EJB3 and am missing something when it comes to accessing
I am using SSIS on SQL Server 2005, VS 2005 SP2. I have created

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.