Considering price/performance and cost of acquisition of some xMart BSO, I have to agree with most opinions that would say to forego any temptation at "upgrading." Replace a part if indeed you must repair the low-end bike, but don't try to upgrade the BSO simply because to do so would end up costing FAR MORE than getting a solid/decent bike at an LBS to start with.
There's an irony to the xMart BSO, that I think many opinions on this thread have expressed. And that's the contradiction in trying to save money by buying a BSO in the first place, versus the reality that the BSO is likely to cost far more in maintenance and operations and never really serve well as a bike. The only time, I think a BSO is worth buying is for a kid needing a cheap bike that he will grow out quickly of -AND- who has a parent/guardian who can and is -willing- to assemble the bike properly.
Much of the reason why BSOs dominate the volume however, is simply because most buyers around the world aren't considering the total cost of ownership. It varies from person to person, but in general, has contributing factors such as Cost of Acquisition, Reliability, Serviceability, and Performance. Most folks only consider the first factor, cost of acquisition, and that dominates their thinking, which results in massive sales of BSOs. But given sufficient time of ownership, all buyers of BSOs tend to end up dealing with Performance (it typically sucks to start with), then the reliability of stuff that started out poorly performing and then failing to perform at all, and then the massive cost or even inability to obtain service for that bike.
Unless a buyer is going to service the bike himself (or has a line on a brother-in-law who fixes bikes for cheap and keeps parts in stock at his house - i.e. I'm that bro-in-law...unfortunately for me) and enjoys the masochistic endeavour of working with crappy parts (I don't enjoy that - but enjoy getting nagged by the big sis even less) and working often with that bike-shaped object, it really doesn't make sense to buy that BSO to start with.
So for the OP that posed the initial questions about upgrading, well, it depends on individual Utility one gets from certain tangible and intangible things, for example, maybe:
TCO = Total Cost of Ownership = Function(Acquistion, Reliability, Serviceability)
TCO typically is fixed and non-varying for any given use-profile. We know the cost, the reliability and the estimated costs for average repairs, so TCO tends to be well defined and non-varying for all customers.
Utility as a Consumer = Function(TCO, Performance, Subjective Qualities like paint/style/logos/etc.)
Most consumers would be well advised to maximize utility, but they input the wrong data into the formula. So instead of TCO, they put in just the Cost of Acquisition. And they have zero-clue about performance and what they want out of the bike (i.e. - it has "gears" on it - good enough!). And lastly, most buy because they like the "look" of a bike - aka, nice logos and paint jobs.
Based on maximizing utility, I would ask the OP, does it make sense to upgrade an xMart BSO? Or would it behoove him to start with a frameset/bike of known, higher quality in fit/finish/machining/geometry and then upgrade? I admit, both my daughters, one 9 yrs old and the other 3 yrs old, are currently riding xMart BSOs. And that's because they only will ride those for a couple of years, and aren't depending on them for reliable transportation. And with exception of replacing brake cables, brake pads, Vbrake noodles, and brake housing, and the occasional tire/tube, I won't consider upgrades to those bikes. It just doesn't compute.