{"id":717,"date":"2011-10-27T03:19:40","date_gmt":"2011-10-27T10:19:40","guid":{"rendered":"http:\/\/www.andreanolanusse.com\/en\/?p=717"},"modified":"2013-02-02T20:40:35","modified_gmt":"2013-02-03T04:40:35","slug":"creating-xml-files-with-delphi-and-firemonkey-on-mac","status":"publish","type":"post","link":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/","title":{"rendered":"Creating XML files with Delphi and FireMonkey on Mac"},"content":{"rendered":"<p>I got some questions about how to manipulate XML files in <a href=\"http:\/\/www.embarcadero.com\/products\/firemonkey\" target=\"_blank\">FireMonkey<\/a> applications when running on Mac.<\/p>\n<p>One of the solution for that is to use the Mac API (Cocoa), there are several class and different ways to work with XML on Mac, in this post I&#8217;m going to show one way to create an XML file, if you are interested to learn more about the XML class available for Mac, visit the Apple documentation <a href=\"http:\/\/developer.apple.com\/library\/mac\/#documentation\/Cocoa\/Conceptual\/NSXML_Concepts\/NSXML.html#\/\/apple_ref\/doc\/uid\/TP40001269\" target=\"_blank\">website<\/a>.<\/p>\n<p>Cocoa provide several classes\/interfaces to work with XML, the sample project used on this post use\u00a0<a href=\"http:\/\/developer.apple.com\/library\/mac\/#documentation\/Cocoa\/Reference\/Foundation\/Classes\/NSXMLDocument_Class\/Reference\/Reference.html#\/\/apple_ref\/occ\/cl\/NSXMLDocument\" target=\"_blank\">NSXMLDocument<\/a>, <a href=\"http:\/\/developer.apple.com\/library\/mac\/#documentation\/Cocoa\/Reference\/Foundation\/Classes\/NSXMLElement_Class\/Reference\/Reference.html#\/\/apple_ref\/occ\/cl\/NSXMLElement\" target=\"_blank\">NSXMLElement<\/a>, <a href=\"http:\/\/developer.apple.com\/library\/mac\/#documentation\/Cocoa\/Reference\/Foundation\/Classes\/NSXMLNode_Class\/Reference\/Reference.html\" target=\"_blank\">NSXMLNode<\/a> and NSData interfaces and related classes, all of them can be found in the Macapi.Foundation unit.<\/p>\n<p>The NSXMLDocument interface and TNSXMLDocument class are the starting point to create the XML Document, where we define the version and\u00a0encoding\u00a0for the XML file.<\/p>\n<pre class=\"brush: delphi\">procedure TFrmXml.CreateXMLButtonClick(Sender: TObject);\r\nvar\r\n  XmlDoc: NSXMLDocument;\r\n  Root, Book, Author, Publisher: NSXMLElement;\r\n  Data: NSData;\r\nbegin\r\n\r\n  \/\/ Create Xml Document\r\n  XmlDoc := TNSXMLDocument.Create;\r\n  XmlDoc.setVersion(NSSTR('1.0'));\r\n  XmlDoc.setCharacterEncoding(NSSTR('UTF-8'));<\/pre>\n<p>After that we need to define what XML elements (nodes) will be added to the XML, since I&#8217;m going to create several elements I created three helper methods (CreateElement and Attribute) to help me with that.<\/p>\n<p>The CreateElement method has two implementations, the first one is very simple, just create a new TNSXMLElement based on the name and value parameters.<\/p>\n<pre class=\"brush: delphi\">function TFrmXml.CreateElement(Name, Value: String): NSXMLElement;\r\nbegin\r\n  Result := TNSXMLElement.Create;\r\n  Result.setName(NSSTR(Name));\r\n  Result.setStringValue(NSSTR(Value));\r\nend;<\/pre>\n<p>The second CreateElement implementation creates a new element which can contain attributes, in order to pass a NSXMLNode that represent a attribute, we will use the Attribute helper method.<\/p>\n<pre class=\"brush: delphi\">function TFrmXml.CreateElement(Name: String; Attr: NSXMLNode): NSXMLElement;\r\nbegin\r\n  Result := TNSXMLElement.Create;\r\n  Result.initWithName(NSSTR(Name));\r\n\r\n  if Assigned(Attr) then\r\n    Result.addAttribute(Attr);\r\nend;<\/pre>\n<p>Below a short overview about the NSXMLNode class extracted from Apple documentation:<\/p>\n<blockquote><p>Objects of the NSXMLNode class are nodes in the abstract, logical tree structure that represents an XML document. Node objects can be of different kinds, corresponding to the following markup constructs in an XML document: element, attribute, text, processing instruction, namespace, and comment. In addition, a document-node object (specifically, an instance of NSXMLDocument) represents an XML document in its entirety. NSXMLNode objects can also represent document type declarations as well as declarations in Document Type Definitions (DTDs). Class factory methods of NSXMLNode enable you to create nodes of each kind. Only document, element, and DTD nodes may have child nodes.<\/p>\n<p>Among the NSXML family of classes\u2014that is, the Foundation classes with the prefix \u201cNSXML\u201d (excluding NSXMLParser)\u2014the NSXMLNode class is the base class. Inheriting from it are the classes NSXMLElement, NSXMLDocument, NSXMLDTD, and NSXMLDTDNode. NSXMLNode specifies the interface common to all XML node objects and defines common node behavior and attributes, for example hierarchy level, node name and value, tree traversal, and the ability to emit representative XML markup text.<\/p><\/blockquote>\n<p>NSXMLNode could be a comment, text, element and other types in Cocoa, the Attribute helper method ensure we will receive a NSXMLNode of type attribute.<\/p>\n<pre class=\"brush: delphi\">function TFrmXml.Attribute(Name, Value: String): NSXMLNode;\r\nvar\r\n  Node: Pointer;\r\nbegin\r\n  Node := TNSXMLNode.OCClass.attributeWithName(NSSTR(Name), NSSTR(Value));\r\n  Result := TNSXMLNode.Wrap(Node);\r\nend;<\/pre>\n<p>&nbsp;<\/p>\n<p>Now is time to\u00a0use the helper methods to create the XML document and at the end use the NSData object to format and save the XML file. This is what the following code does:<\/p>\n<pre class=\"brush: delphi\">  \/\/ Create the root doc element including one attribute\r\n  Root := CreateElement('BookStore', Attribute('url', 'http:\/\/www.amazon.com'));\r\n  XmlDoc.initWithRootElement(Root);\r\n\r\n  \/\/ Create the first Book node\r\n  Book := CreateElement('Book', Attribute('Name', 'Steve Jobs'));\r\n\r\n  \/\/ Create the Author and Publisher elements\r\n  Author := CreateElement('Author', 'Walter Isaacson');\r\n  Publisher := CreateElement('Publisher', 'Simon Schuster (October 24, 2011)');\r\n\r\n  \/\/ Add the elements to the XML\r\n  Root.addChild(Book);\r\n  Book.addChild(Author);\r\n  Book.addChild(Publisher);\r\n\r\n  \/\/ Create the second Book node\r\n  Book := CreateElement('Book', Attribute('Name',\r\n    'Clean Code: A Handbook of Agile Software Craftsmanship'));\r\n  Author := CreateElement('Author', 'Robert C. Martin');\r\n  Publisher := CreateElement('Publisher',\r\n    'Prentice Hall; 1 edition (August 11, 2008)');\r\n\r\n  \/\/ Add the elements from the second Book node to the XML\r\n  Root.addChild(Book);\r\n  Book.addChild(Author);\r\n  Book.addChild(Publisher);\r\n\r\n  \/\/ Makes the Xml output more human-readable inserting\r\n  \/\/ carriage returns and indenting nested elements\r\n  Data := XmlDoc.XMLDataWithOptions(NSXMLNodePrettyPrint);\r\n  Data.writeToFile(NSSTR(XMLLocation.Text), true);\r\n\r\n  XmlContent.Lines.LoadFromFile(XMLLocation.Text);\r\n\r\nend;\r\n\r\nend.<\/pre>\n<p>Here the resulting app on Mac OS X:<\/p>\n<p><a href=\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-718\" title=\"FireMonkey app creating XML on Mac\" alt=\"\" src=\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png\" width=\"558\" height=\"441\" srcset=\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png 558w, http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML-450x356.png 450w, http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML-300x237.png 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/a><\/p>\n<p>You can download the source code directly from the RAD Studio demos repository <a href=\"https:\/\/radstudiodemos.svn.sourceforge.net\/svnroot\/radstudiodemos\/branches\/RadStudio_XE2\/FireMonkey\/XMLonMac\" target=\"_blank\">here<\/a>\u00a0and it was tested\u00a0with Delphi XE2 and XE3.<\/p>\n<p>I originally mention that TXMLDocument was not available for Mac, and this is incorrect, thanks\u00a0Chris Rolliston for the heads up and to migrate my sample to TXMLDocument.<\/p>\n<p>When you drop a TXMLDocument component on your design the default DOMVendor MSXML, you have to change to ADOM XML v4 to support cross-platform. In case you have the unit Xml.Win.msxmldom added on your form you won&#8217;t be able to compile for Mac, after you set the DOMVendor to ADOM XML v4 remove that unit from your code and everything will be fine.<\/p>\n<p>Here the version using TXMLDocument:<\/p>\n<pre class=\"brush: delphi\">unit MainForm;\r\n\r\ninterface\r\n\r\nuses\r\n  System.SysUtils, System.Types, System.UITypes, System.Classes,\r\n  System.Variants, XML.XMLDoc, FMX.Dialogs,\r\n  FMX.Types, FMX.Controls, FMX.Forms, FMX.Layouts,\r\n  FMX.Memo, FMX.Edit, FMX.Effects, FMX.Objects, Xml.xmldom, Xml.XMLIntf;\r\n\r\ntype\r\n  TFrmXml = class(TForm)\r\n    CreateXMLButton: TButton;\r\n    XmlContent: TMemo;\r\n    XMLLocation: TEdit;\r\n    Label1: TLabel;\r\n    Image1: TImage;\r\n    procedure CreateXMLButtonClick(Sender: TObject);\r\n    procedure FormCreate(Sender: TObject);\r\n  end;\r\n\r\nvar\r\n  FrmXml: TFrmXml;\r\n\r\nimplementation\r\n\r\n{$R *.fmx}\r\n\r\nprocedure TFrmXml.CreateXMLButtonClick(Sender: TObject);\r\nvar\r\n  XmlDoc: IXMLDocument;\r\n  Root, Book, Author, Publisher: IXMLNode;\r\nbegin\r\n  \/\/ Create Xml Document\r\n  XmlDoc := TXMLDocument.Create(nil);\r\n  XmlDoc.Active := True;\r\n  XmlDoc.Options := XmlDoc.Options + [doNodeAutoIndent];\r\n  XmlDoc.Version := '1.0';\r\n\r\n  \/\/ Create the root doc element with one attributes\r\n  Root := XmlDoc.CreateNode('BookStore');\r\n  Root.Attributes['url'] := 'http:\/\/www.amazon.com';\r\n  XmlDoc.DocumentElement := Root;\r\n\r\n  \/\/ Create the first Book node\r\n  Book := XmlDoc.CreateNode('Book');\r\n  Book.Attributes['Name'] := 'Steve Jobs';\r\n\r\n  \/\/ Create the Author and Publisher elements\r\n  Author := XmlDoc.CreateNode('Author');\r\n  Author.Text := 'Walter Isaacson';\r\n  Publisher := XmlDoc.CreateNode('Publisher');\r\n  Publisher.Text := 'Simon Schuster (October 24, 2011)';\r\n\r\n  \/\/ Add the elements to the XML\r\n  Root.ChildNodes.Add(Book);\r\n  Book.ChildNodes.Add(Author);\r\n  Book.ChildNodes.Add(Publisher);\r\n\r\n  \/\/ Create the second Book node\r\n  Book := XmlDoc.CreateNode('Book');\r\n  Book.Attributes['Name'] := 'Clean Code: A Handbook of Agile Software Craftsmanship';\r\n  Author := XmlDoc.CreateNode('Author');\r\n  Author.Text := 'Robert C. Martin';\r\n  Publisher := XmlDoc.CreateNode('Publisher');\r\n  Publisher.Text := 'Prentice Hall; 1 edition (August 11, 2008)';\r\n\r\n  \/\/ Add the elements from the second Book node to the XML\r\n  Root.ChildNodes.Add(Book);\r\n  Book.ChildNodes.Add(Author);\r\n  Book.ChildNodes.Add(Publisher);\r\n\r\n  XmlDoc.SaveToFile(XMLLocation.Text);\r\n\r\n  XmlContent.Lines.LoadFromFile(XMLLocation.Text);\r\n\r\nend;\r\n\r\nprocedure TFrmXml.FormCreate(Sender: TObject);\r\nbegin\r\n  XMLLocation.Text := IncludeTrailingPathDelimiter(GetHomePath) + 'create.xml';\r\nend;\r\n\r\nend.<\/pre>\n<p>With this you have everything you need to manipulate XML file on Windows and Mac.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got some questions about how to manipulate XML files in FireMonkey applications when running on Mac. One of the solution for that is to use the Mac API (Cocoa), there are several class and different ways to work with XML on Mac, in this post I&#8217;m going to show one way to create an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_s2mail":"yes","footnotes":""},"categories":[10,79],"tags":[90,100],"class_list":["post-717","post","type-post","status-publish","format-standard","hentry","category-delphi","category-firemonkey","tag-delphi","tag-firemonkey"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FireMonkey and Delphi support for XML files on Mac | Andreano Lanusse<\/title>\n<meta name=\"description\" content=\"This articles show how you can manipulate XML files on Mac OS X using Delphi and FireMonkey, through Cocoa API and Delphi TXMLDocument component.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FireMonkey and Delphi support for XML files on Mac | Andreano Lanusse\" \/>\n<meta property=\"og:description\" content=\"This articles show how you can manipulate XML files on Mac OS X using Delphi and FireMonkey, through Cocoa API and Delphi TXMLDocument component.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/\" \/>\n<meta property=\"og:site_name\" content=\"Andreano Lanusse | Technology and Software Development\" \/>\n<meta property=\"article:published_time\" content=\"2011-10-27T10:19:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-02-03T04:40:35+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png\" \/>\n<meta name=\"author\" content=\"Andreano Lanusse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andreano Lanusse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/\"},\"author\":{\"name\":\"Andreano Lanusse\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"headline\":\"Creating XML files with Delphi and FireMonkey on Mac\",\"datePublished\":\"2011-10-27T10:19:40+00:00\",\"dateModified\":\"2013-02-03T04:40:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/\"},\"wordCount\":628,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"image\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png\",\"keywords\":[\"Delphi\",\"FireMonkey\"],\"articleSection\":[\"Delphi\",\"FireMonkey\"],\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/\",\"url\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/\",\"name\":\"FireMonkey and Delphi support for XML files on Mac | Andreano Lanusse\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png\",\"datePublished\":\"2011-10-27T10:19:40+00:00\",\"dateModified\":\"2013-02-03T04:40:35+00:00\",\"description\":\"This articles show how you can manipulate XML files on Mac OS X using Delphi and FireMonkey, through Cocoa API and Delphi TXMLDocument component.\",\"breadcrumb\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage\",\"url\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png\",\"contentUrl\":\"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png\",\"width\":558,\"height\":441},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.andreanolanusse.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating XML files with Delphi and FireMonkey on Mac\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#website\",\"url\":\"https:\/\/www.andreanolanusse.com\/en\/\",\"name\":\"Andreano Lanusse | Technology and Software Development\",\"description\":\"Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos\",\"publisher\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.andreanolanusse.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\",\"name\":\"Andreano Lanusse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g\",\"caption\":\"Andreano Lanusse\"},\"logo\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/\"},\"description\":\"Andreano Lanusse is an expert and enthusiastic on software development industry, at Embarcadero he is focused on helping to make sure the products being developed meet the expectations of Embarcadero's customers, as well as defining market strategies for Latin America. Today as Latin Lead Evangelist he spends great deal of time in developer conferences, tradeshows, user group, and visiting customers throughout Latin America. Before Embarcadero, he worked 13 years for Borland, Andreano has worked as Support Coordinator, Engineer, Product Manager, including Product Line Sales Manager, where was responsible to manage the relationship with Brazil developer community, also has worked as Principal Consultant for Borland Consulting Services on the development and management of critical applications. He previously served as Chief Architect for USS Solu\u00e7\u00f5es Gerenciadas (now USS Tempo). Andreano holds a bachelor's degree in Business Administration Marketing Emphasis from Sumare Institute, MBA in Project Management from FGV, certification in Microsoft products, all Borland ALM products, and all CodeGear product line.\",\"sameAs\":[\"http:\/\/www.andreanolanusse.com\",\"https:\/\/x.com\/andreanolanusse\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FireMonkey and Delphi support for XML files on Mac | Andreano Lanusse","description":"This articles show how you can manipulate XML files on Mac OS X using Delphi and FireMonkey, through Cocoa API and Delphi TXMLDocument component.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/","og_locale":"en_US","og_type":"article","og_title":"FireMonkey and Delphi support for XML files on Mac | Andreano Lanusse","og_description":"This articles show how you can manipulate XML files on Mac OS X using Delphi and FireMonkey, through Cocoa API and Delphi TXMLDocument component.","og_url":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/","og_site_name":"Andreano Lanusse | Technology and Software Development","article_published_time":"2011-10-27T10:19:40+00:00","article_modified_time":"2013-02-03T04:40:35+00:00","og_image":[{"url":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png","type":"","width":"","height":""}],"author":"Andreano Lanusse","twitter_misc":{"Written by":"Andreano Lanusse","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#article","isPartOf":{"@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/"},"author":{"name":"Andreano Lanusse","@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"headline":"Creating XML files with Delphi and FireMonkey on Mac","datePublished":"2011-10-27T10:19:40+00:00","dateModified":"2013-02-03T04:40:35+00:00","mainEntityOfPage":{"@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/"},"wordCount":628,"commentCount":3,"publisher":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"image":{"@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage"},"thumbnailUrl":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png","keywords":["Delphi","FireMonkey"],"articleSection":["Delphi","FireMonkey"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/","url":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/","name":"FireMonkey and Delphi support for XML files on Mac | Andreano Lanusse","isPartOf":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage"},"image":{"@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage"},"thumbnailUrl":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png","datePublished":"2011-10-27T10:19:40+00:00","dateModified":"2013-02-03T04:40:35+00:00","description":"This articles show how you can manipulate XML files on Mac OS X using Delphi and FireMonkey, through Cocoa API and Delphi TXMLDocument component.","breadcrumb":{"@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#primaryimage","url":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png","contentUrl":"http:\/\/www.andreanolanusse.com\/en\/wp-content\/uploads\/2011\/10\/FMX_Creating_XML.png","width":558,"height":441},{"@type":"BreadcrumbList","@id":"http:\/\/www.andreanolanusse.com\/en\/creating-xml-files-with-delphi-and-firemonkey-on-mac\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.andreanolanusse.com\/en\/"},{"@type":"ListItem","position":2,"name":"Creating XML files with Delphi and FireMonkey on Mac"}]},{"@type":"WebSite","@id":"https:\/\/www.andreanolanusse.com\/en\/#website","url":"https:\/\/www.andreanolanusse.com\/en\/","name":"Andreano Lanusse | Technology and Software Development","description":"Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos","publisher":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.andreanolanusse.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":["Person","Organization"],"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b","name":"Andreano Lanusse","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g","caption":"Andreano Lanusse"},"logo":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/"},"description":"Andreano Lanusse is an expert and enthusiastic on software development industry, at Embarcadero he is focused on helping to make sure the products being developed meet the expectations of Embarcadero's customers, as well as defining market strategies for Latin America. Today as Latin Lead Evangelist he spends great deal of time in developer conferences, tradeshows, user group, and visiting customers throughout Latin America. Before Embarcadero, he worked 13 years for Borland, Andreano has worked as Support Coordinator, Engineer, Product Manager, including Product Line Sales Manager, where was responsible to manage the relationship with Brazil developer community, also has worked as Principal Consultant for Borland Consulting Services on the development and management of critical applications. He previously served as Chief Architect for USS Solu\u00e7\u00f5es Gerenciadas (now USS Tempo). Andreano holds a bachelor's degree in Business Administration Marketing Emphasis from Sumare Institute, MBA in Project Management from FGV, certification in Microsoft products, all Borland ALM products, and all CodeGear product line.","sameAs":["http:\/\/www.andreanolanusse.com","https:\/\/x.com\/andreanolanusse"]}]}},"_links":{"self":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts\/717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/comments?post=717"}],"version-history":[{"count":0,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts\/717\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/media?parent=717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/categories?post=717"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/tags?post=717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}