android - Parse an xml once for use across many activities -


i'm working saxparser parse xml. problem is, have few screens or activities coded. @ moment, every time transition new activity button press example, new activity needs parse xml on again, can populate screen specific content.

is there way in parse xml once through life of program?

thank you.

sure, parse once , store want remember in variables.

more completely, create class (or classes) classes represent properties same information in xml document. constructor of class take xml argument, parse it, , populate properties.

hope helps.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -