Git Product home page Git Product logo

Comments (5)

jmarceli avatar jmarceli commented on July 19, 2024

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.

mimooh avatar mimooh commented on July 19, 2024

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.

jmarceli avatar jmarceli commented on July 19, 2024

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.

mimooh avatar mimooh commented on July 19, 2024

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.

jmarceli avatar jmarceli commented on July 19, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.