Friday, 10 June 2016

XML : Include schema link into XML by using php

I have a script in php which creates an XML file.

  $xml1   = "<?xml version='1.0' encoding='utf-8'?>\n";  $xml1   .= "\t<invoices>\n";  $xml1   .= "\t\t<journal>\n";    

I would need to add a schema link to "invoices" so that the XML output looks like the following:

  <invoices xsi:noNamespaceSchemaLocation="http://schema.aptic.net/aptic-link-import-ledgeraccounts-v2.xsd">    

Whatever I try I always receive an error and the XML file is not created. How could I solve this or where could I find information on how to insert the required schema link correctly.

Thank you

No comments:

Post a Comment