{"id":86008,"date":"2017-06-09T15:53:06","date_gmt":"2017-06-09T15:53:06","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=86008"},"modified":"2017-06-09T15:53:06","modified_gmt":"2017-06-09T15:53:06","slug":"edit-xml-attributes-php","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/","title":{"rendered":"How to edit the XML attributes in PHP"},"content":{"rendered":"<p>Today we will learn , how to edit the xml element attributes in PHP.<\/p>\n<p>First of all, we need to create a sample xml file. So we have created the demo.xml file as follows<\/p>\n<pre class=\"brush:xml\">\/**\r\n * Webkul Software.\r\n *\r\n * @category Webkul\r\n * @package xml\r\n * @author Webkul\r\n * @copyright Copyright (c) 2010-2017 Webkul Software Private Limited (https:\/\/webkul.com)\r\n * @license https:\/\/store.webkul.com\/license.html\r\n *\/\r\n\r\n &lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n &lt;appSettings&gt;\r\n   &lt;add key=\"Id\" value=\"0\"\/&gt;\r\n   &lt;add key=\"Name\" value=\"Test\"\/&gt;\r\n &lt;\/appSettings&gt;<\/pre>\n<p>After creating the xml file, we have created the php file as follows:<\/p>\n<pre class=\"brush:php\">\/**\r\n * Webkul Software.\r\n *\r\n * @category Webkul\r\n * @package api\r\n * @author Webkul\r\n * @copyright Copyright (c) 2010-2017 Webkul Software Private Limited (https:\/\/webkul.com)\r\n * @license https:\/\/store.webkul.com\/license.html\r\n *\/\r\n\r\n &lt;?php\r\n\r\n $xml = simplexml_load_file('demo.xml');\r\n\r\n print_r(\"&lt;pre&gt;\");\r\n print_r($xml);\r\n print_r(\"&lt;\/pre&gt;\");\r\n\r\n if ($xml-&gt;xpath('\/\/appSettings\/add[@key=\"Id\"]')[0]) {\r\n\r\n     $xml-&gt;xpath('\/\/appSettings\/add[@key=\"Id\"]')[0]-&gt;attributes()['value'] = 1;\r\n }\r\n\r\n if ($xml-&gt;xpath('\/\/appSettings\/add[@key=\"Name\"]')[0]) {\r\n\r\n     $xml-&gt;xpath('\/\/appSettings\/add[@key=\"Name\"]')[0]-&gt;attributes()['value'] = 'Demo';\r\n }\r\n\r\n $xml-&gt;asXML('demo.xml');\r\n ?&gt;<\/pre>\n<p><strong>Function Description:<\/strong><\/p>\n<p>simplexml_load_file : The function is used to convert the xml file into SimpleXMLElement object. In this\u00a0function\u00a0first\u00a0parameter\u00a0is\u00a0file\u00a0path\u00a0where we pass the\u00a0path\u00a0of\u00a0our\u00a0xml\u00a0file. Syntax\u00a0for\u00a0the\u00a0function\u00a0is :<\/p>\n<p>SimpleXMLElement simplexml_load_file ( string $filename \u00a0string $class_name , int $options , string $ns , bool is_prefix)<\/p>\n<p>xpath : The function searches the XML element for children matching the XPath path. Like in the example it will search the add element with in the appsetting that has an attribute key and their value is Id or Name.<\/p>\n<p>asXML : The function is just reverse of simplexml_load_file and converts the xml object to the xml format.<\/p>\n<p>When we execute the php\u00a0file for the first time it will produce the following output.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-86011\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output1.png\" alt=\"\" width=\"624\" height=\"430\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output1.png 624w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output1-250x172.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output1-300x207.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" loading=\"lazy\" \/><\/p>\n<p>We can see the changes in the demo.xml\u00a0file or we can execute the php\u00a0file again, we will see the changed values in the xml file as follows :<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-86013\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output2.png\" alt=\"\" width=\"548\" height=\"452\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output2.png 548w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output2-250x206.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/06\/output2-300x247.png 300w\" sizes=\"(max-width: 548px) 100vw, 548px\" loading=\"lazy\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we will learn , how to edit the xml element attributes in PHP. First of all, we need to create a sample xml file. So we have created the demo.xml file as follows \/** * Webkul Software. * * @category Webkul * @package xml * @author Webkul * @copyright Copyright (c) 2010-2017 Webkul Software <a href=\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":124,"featured_media":84482,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-86008","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to edit the XML attributes in PHP - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to edit the XML attributes in PHP - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Today we will learn , how to edit the xml element attributes in PHP. First of all, we need to create a sample xml file. So we have created the demo.xml file as follows \/** * Webkul Software. * * @category Webkul * @package xml * @author Webkul * @copyright Copyright (c) 2010-2017 Webkul Software [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-09T15:53:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sarang Agrawal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sarang Agrawal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\"},\"author\":{\"name\":\"Sarang Agrawal\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3fe787f5e9200d06d3ebf9aa86af1558\"},\"headline\":\"How to edit the XML attributes in PHP\",\"datePublished\":\"2017-06-09T15:53:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\"},\"wordCount\":214,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png\",\"articleSection\":[\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\",\"url\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\",\"name\":\"How to edit the XML attributes in PHP - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png\",\"datePublished\":\"2017-06-09T15:53:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png\",\"width\":\"825\",\"height\":\"260\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to edit the XML attributes in PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3fe787f5e9200d06d3ebf9aa86af1558\",\"name\":\"Sarang Agrawal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/463bd0dd4a24de98604547719c1903e8af6b4133153ba8cc08799c7b2e3a5ce6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/463bd0dd4a24de98604547719c1903e8af6b4133153ba8cc08799c7b2e3a5ce6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sarang Agrawal\"},\"sameAs\":[\"http:\/\/webkul.com\/blog\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/sarang-agrawal032\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to edit the XML attributes in PHP - Webkul Blog","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":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/","og_locale":"en_US","og_type":"article","og_title":"How to edit the XML attributes in PHP - Webkul Blog","og_description":"Today we will learn , how to edit the xml element attributes in PHP. First of all, we need to create a sample xml file. So we have created the demo.xml file as follows \/** * Webkul Software. * * @category Webkul * @package xml * @author Webkul * @copyright Copyright (c) 2010-2017 Webkul Software [...]","og_url":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-06-09T15:53:06+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png","type":"image\/png"}],"author":"Sarang Agrawal","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sarang Agrawal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/"},"author":{"name":"Sarang Agrawal","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3fe787f5e9200d06d3ebf9aa86af1558"},"headline":"How to edit the XML attributes in PHP","datePublished":"2017-06-09T15:53:06+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/"},"wordCount":214,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png","articleSection":["php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/","url":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/","name":"How to edit the XML attributes in PHP - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png","datePublished":"2017-06-09T15:53:06+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/05\/Code-Snippet.png","width":"825","height":"260"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/edit-xml-attributes-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to edit the XML attributes in PHP"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3fe787f5e9200d06d3ebf9aa86af1558","name":"Sarang Agrawal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/463bd0dd4a24de98604547719c1903e8af6b4133153ba8cc08799c7b2e3a5ce6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/463bd0dd4a24de98604547719c1903e8af6b4133153ba8cc08799c7b2e3a5ce6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sarang Agrawal"},"sameAs":["http:\/\/webkul.com\/blog"],"url":"https:\/\/webkul.com\/blog\/author\/sarang-agrawal032\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/86008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/124"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=86008"}],"version-history":[{"count":4,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/86008\/revisions"}],"predecessor-version":[{"id":86024,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/86008\/revisions\/86024"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/84482"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=86008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=86008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=86008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}