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

  • Home
  • SEARCH
  • 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 6541449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:06:24+00:00 2026-05-25T11:06:24+00:00

My code returns this: \1.12.0.1058\ and I am not sure if I should be

  • 0

My code returns this: \”1.12.0.1058\” and I am not sure if I should be stripping out the \” manually or what. The gsub is not stripping the characters out.

Code:

response = RestClient.get(@deathburritoapp_url)
        xml_doc = Nokogiri::XML(response)
        @app_packages = xml_doc.xpath("//applicationPackages//applicationPackage")
        if @app_packages != nil
          @app_packages.each do |app_pack|
            @package_id = app_pack.attribute("id").text.to_i
            @version    = app_pack.at_xpath("./version").text
            @version    = @version.gsub(/"\\/, ' ')
            @result     = "Package Id: " + @package_id.inspect + "; Version: " + @version.inspect
            Rails.logger.debug("Results: " + @result.inspect)
          end

XML:

<applicationPackages>
  <applicationPackage id="229">
    <application key="deathburrito" id="2">
        <name>deathBURRITO</name> 
    </application>
    <version>0.13.1 SNAPSHOT</version> 
    <packageType id="1">
        <name>war</name> 
    </packageType>
    <architecture id="5">
        <name>java</name> 
    </architecture>
  </applicationPackage>
  <applicationPackage id="98">
      <application key="deathburrito" id="2">
        <name>deathBURRITO</name> 
      </application>
      <version>1.10.0 SNAPSHOT</version> 
      <packageType id="1">
        <name>war</name> 
      </packageType>
      <architecture id="5">
        <name>java</name> 
      </architecture>
  </applicationPackage>
</applicationPackages>

Results from Debug:

Results: “Package Id: 229; Version: \”0.13.1-SNAPSHOT\””

  • 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-25T11:06:24+00:00Added an answer on May 25, 2026 at 11:06 am

    That’s just inspect doing it’s thing:

    ruby-1.9.2-p180 :002 > "foo".inspect
     => "\"foo\"" 
    

    The version is just a normal ruby string, you don’t need to do anything special.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code returns 0 objects which is not correct. However, when removing the predicate,
Does anyone know how why this code returns out of range exception? For example
why this code returns wrong value? int i=Integer.MAX_VALUE+1; long l=Integer.MAX_VALUE+1; System.out.println(l); System.out.println(i);
This code returns an error: AttributeError: can't set attribute This is really a pity
This has me stumped. The follow code returns ,,,,,,: <script type=text/javascript> $(function() { $('#listB').sortable({
this code always returns 0 in PHP 5.2.5 for microseconds: <?php $dt = new
Basically this code below returns the right information, but I need to add the
I have this code and it always returns -1.I have three tables (a picture
In this C# code snippet, DateTime.Now.Month.ToString() returns 7 as output. I would like to
Can anyone explain why this code with the given routes returns the first route?

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.