0

I have a xml file in my xml app folder with entries like this:

<defaultsMap>
    <entry>
        <key>latest_gplay_app_version</key>
        <value>5.3</value>
    </entry>
</defaultsMap>

I would like to replace <value>5.3</value> with something like:

 <value>"@string/latest_version"</value>

so that the value is automatically set to the latest_version string defined in my strings.xml file

How can I di this ?

Thanks !

1 Answer 1

1

You cannot. This is not universal feature - it applies only to resources XMLs (res/ folder in your project) so you need to read your raw XML, substitute what you need and then use your final XML. Naturally you can substiture with the value read from resources if needed, yet some code is needed anyway.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.