Comments (5)
What do you mean by hardcoding that to your XML?
You may clone/download that repo and use it from PHP, but there is nothing to hardcode in XML.
from array2xml.
Thanks for a quick answer. Sorry, but github removed the xml from my post and I didn't notice :) The thing is I need to produce an xml with a root element with attribs:
?xml version="1.0" encoding="UTF-8"?
works xmlns="http://pbn.nauka.gov.pl/-/ns/bibliography" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" pbn-unit-id="125" xsi:schemaLocation="http://pbn.nauka.gov.pl/-/ns/bibliography PBN-report.xsd "
from array2xml.
I don't think it is possible right now (at least not without some modifications to PHP codebase). I may add such feature, but to be true this is just a quickly created repo which needs some automated tests for any refactoring/improvements.
from array2xml.
I thought that perhaps I could hardcode this line for my own use
somewhere in my copy of your module. I can live without it, you know -
can just always delete and insert the second line of the xml file. But
it looks like a feature of plenty xml files in the wild, so a good
thing to have in your module. Otherwise, the module is great, thanks
for sharing!
from array2xml.
OK. I think you may fork/hardcode some changes around line 41 (https://github.com/jmarceli/array2xml/blob/master/ArrayToXML.php#L41) check the http://php.net/manual/en/function.xmlwriter-start-document.php docs for more info.
from array2xml.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from array2xml.