.Resx files and .xml data

What is the best way to store the XML data used in a program? Use a RESX file or save it as an .xml file, upload and download files as required.

+3
source share
3 answers

The third option is to place the XML file as an embedded resource in the assembly. In this case, use Assembly.GetManifestResourceStream () to load the XML.

As Cerebus wrote, when localization is required, RESX will be the way to go.

+2
source

.resx XML , (Microsoft ResX Schema v2.0). .

XML. . , , .resx. , XML .

+2

XML (blobs) .resx

:

:

  • , . . 10 , - 10 , 10 , , .
  • Code encoding is dramatically reduced by storing XML as a string of Key-value-pairs in Resx. Because the resx editor is not XML sensitive.

If you store xml content very strongly as an embedded resource, you can create an XML file and save it as a file resource inside RESX.

0
source

Source: https://habr.com/ru/post/1706717/


All Articles