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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:20:44+00:00 2026-05-14T05:20:44+00:00

My concern is performance, is there a reason to to send the client XML

  • 0

My concern is performance, is there a reason to to send the client XML instead of valid HTML? Like most things, I am sure it is application dependent. My specific situation is where there is substantial content being inserted into the web page that has been pulled from a database.

What are the advantages of either approach? Is the size of the content even a concern? Or, in the case of using XML, will the time for the JavaScript to process the XML into HTML counterbalance the extra time that would have been required to send HTML to start with?

Thanks, Jeff

  • 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-14T05:20:45+00:00Added an answer on May 14, 2026 at 5:20 am

    It’s important to recognize that even when fetching HTML you shouldn’t just stick it straight into the DOM without processing it. If it’s not transmitted through a secure protocol it could be subject to MITM attacks. Any time saved parsing XML is spent on sanitizing the HTML to prevent script injections.

    XML is more portable too. The data served in XML can be used anywhere on any page. HTML is different in this aspect (although it can be styled with CSS), not all browsers have a readily available parser without inserting the content into the DOM. Some may have DOMDocument(), but you can’t rely on it for cross browser purposes. With XML, you can also target and extract the data you need effortlessly using XPath. With HTML (x-browser), you’d need to insert into the DOM first or use the ever-so-unreliable regexp method that really shouldn’t ever be used.

    JSON is more lightweight, it does away with a lot of the bulk that comes with XML and HTML. Being native markup for JavaScript objects, it’s also very easy to parse. Unlike XML and HTML, you can also access JSON data cross domain using JSON with Padding (JSONP).

    In summary, you need to choose the method that best suits your needs. Most people tend to go with JSON these days because it’s very light weight, can be accessed cross domain and requires very little effort to parse with JavaScript.

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

Sidebar

Related Questions

I'm using ActiveSupport::Concern and I know there are a few approaches to organizing these
My client-server application is mainly based on special purpose http server that communicates with
Is there any performance issue to be aware about using this sql statement generated
I am, for performance reason, porting a C# library to C++. During normal operation,
I have an application where there are a list of items that my users
I've always wanted to send objects that you can serialize in XML across websites,
Apart from performance concerns, should web-based applications be built differently according to the number
I have a minor concern: I'm currently coding a sign up form and I
My main concern is with the boolean flag... is it safe to use it
To use separation of concern and to optimize the clearness of the controllers we

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.