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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:56:43+00:00 2026-05-20T01:56:43+00:00

I need to parse a XML into a string based on user’s search input

  • 0

I need to parse a XML into a string based on user’s search input using Javascript or Jquery.

XML is located at rssfeed.ucoz.com/rssfeed.xml Too large to place here.

Example:

Original XML

<item>
    <title>Abyssal Warder fire</title>
    <guid isPermaLink="false">//lh5.googleusercontent.com/_qvhVKLFln2A/TU-51_bGZ9I/AAAAAAAAEW4/uAmzL3e-vn0/Abyssal%20Warder%20fire.jpg</guid>
    <media:description>Giant Destroyer</media:description> 
    <media:thumbnail url="http://lh5.googleusercontent.com/_qvhVKLFln2A/TU-51_bGZ9I/AAAAAAAAEW4/uAmzL3e-vn0/s144/Abyssal%20Warder%20fire.jpg" />
    <media:group>
        <media:content url="http://lh5.googleusercontent.com/_qvhVKLFln2A/TU-51_bGZ9I/AAAAAAAAEW4/uAmzL3e-vn0/Abyssal%20Warder%20fire.jpg" />
        <media:content isDefault="true" width="685" height="295" url="http://rssfeed.ucoz.com/Battleforge.html" type="text/html" /> 
    </media:group> 
</item>

<item>
    <title>Abyssal Warder frost</title>
    <guid isPermaLink="false">//lh4.googleusercontent.com/_qvhVKLFln2A/TU-54ZuHv6I/AAAAAAAAEW8/gtPs25XUjhY/Abyssal%20Warder%20frost.jpg</guid>
    <media:description>Giant Destroyer</media:description> 
    <media:thumbnail url="http://lh4.googleusercontent.com/_qvhVKLFln2A/TU-54ZuHv6I/AAAAAAAAEW8/gtPs25XUjhY/s144/Abyssal%20Warder%20frost.jpg" />
    <media:group>
            <media:content url="http://lh4.googleusercontent.com/_qvhVKLFln2A/TU-54ZuHv6I/AAAAAAAAEW8/gtPs25XUjhY/Abyssal%20Warder%20frost.jpg" />
            <media:content isDefault="true" width="685" height="295" url="http://rssfeed.ucoz.com/Battleforge.html" type="text/html" /> 
    </media:group> 
</item>

Outcome as string when user search for “Abyssal Warder Fire” or just “Abyssal Fire”

<item>
    <title>Abyssal Warder fire</title>
    <guid isPermaLink="false">//lh5.googleusercontent.com/_qvhVKLFln2A/TU-51_bGZ9I/AAAAAAAAEW4/uAmzL3e-vn0/Abyssal%20Warder%20fire.jpg</guid>
    <media:description>Giant Destroyer</media:description> 
    <media:thumbnail url="http://lh5.googleusercontent.com/_qvhVKLFln2A/TU-51_bGZ9I/AAAAAAAAEW4/uAmzL3e-vn0/s144/Abyssal%20Warder%20fire.jpg" />
    <media:group>
        <media:content url="http://lh5.googleusercontent.com/_qvhVKLFln2A/TU-51_bGZ9I/AAAAAAAAEW4/uAmzL3e-vn0/Abyssal%20Warder%20fire.jpg" />
        <media:content isDefault="true" width="685" height="295" url="http://rssfeed.ucoz.com/Battleforge.html" type="text/html" /> 
    </media:group> 
</item>

I’ve been searching for 5 days in the net, and I couldn’t get anything. All the results I see are parsed xml that are shown as HTML, but none as string. I need it as string because I will feed the string it into a web application’s api that requires it as a string. Please help, any ideas or code on how to accomplish this would be greatly appreciated. Thanks in advance.

  • 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-20T01:56:44+00:00Added an answer on May 20, 2026 at 1:56 am

    EDIT: i forget to metion that I’m using JQuery

    Here is my point of view:

    function init(){
       $.ajax({
          type: "GET",
          url: "http://localhost/gis/hola.xml",    // this should be your XML url
          dataType: "text",
          success: parseXml    // your own callback function
       });
    }
    
    function parseXml(xml){
       xml = xml.replace(/\n/g,'');       // just to replace carry return
       var url = 'http://localhost/'+xml;
       alert(url);
    }
    

    Your xml file is:

    <?xml version="1.0" encoding="utf-8" ?>
    <RecentTutorials>
      <Tutorial author="The Reddest">
        <Title>Silverlight and the Netflix API</Title>
      </Tutorial>
    </RecentTutorials>
    

    Then, your url variable should be (remember to convert ‘/’ symbol to its specific ASCII character before sends it (http://www.asciitable.com/)):

    http://localhost/<?xml version="1.0" encoding="utf-8" ?><RecentTutorials><Tutorial author="The Reddest"><Title>Silverlight and the Netflix API</Title></Tutorial></RecentTutorials>
    

    url now have this value. If you try to show this var on a div:

    Silverlight and the Netflix API
    

    Because your browser doesn’t skip < and > symbols.

    Try to call your function like this:

    function parseXml(xml){
       xml = xml.replace(/\n/g,'');       // just to replace carry return
       cooliris.embed.setFeedContents('XML parsed as string: '+xml) 
    }
    

    I hope it helps you. Happy codding!

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

Sidebar

Related Questions

For a one-shot operation, i need to parse the contents of an XML string
I have a string like this that I need to parse into a 2D
I need to parse a xml file which is practically an image of a
I need to parse Visual Studio automatically generated XML documentation to create a report.
I need to parse a string like February 12, 1981 as a Date. I
I need to parse an XLIFF file using C#, but I'm having some trouble.
I have a rather big number of source files that I need parse and
I have an application running on multiple IIS servers that need to parse a
I have a collection of HTML documents for which I need to parse the
I have a query filter written in human readable language. I need to parse

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.