Convert XML to .plist

I have XML exported from Oracle DB that will be loaded into the main application package.

I would like to convert this XML file to a .plist file so that I can assign values ​​to NSDictionary and NSArrays ..

Is there any way to make this work? or is there a better way to work with an external xml file?

note that one of the fields in XML is the full HTML content

Example:

<main>
    <DATA_RECORD>
      <ID>ID1</ID>
      <NO>1234512</NO>
      <TYPE>NEW</TYPE>
      <TYPE_NO>0</TYPE_NO>
      <TEXT_ID>TEXT1</TEXT_ID>
      <TEXT><HTML>some html goes here</HTML></TEXT>
    </DATA_RECORD>
  </main>
+3
source share
2 answers

How about this?

You can try plutil

plutil -convert xml1 il_tuo_file_binario.plist

PS: I edited because the first time I read .plist in XML.

+1
source

​​, Oxygen ( 30- oxygenxml.com), XML JSON, OSX JSON PLIST.

 plutil -convert xml1 blahblah.json -o blahblah.plist

....:)

-1

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


All Articles