simplexml


Add xml attribute documentname


I'm exporting orders to xml
I write in the header of XML
$xml = new SimpleXMLElement('<Document></Document>');
$xml->addAttribute('documentname','DCustomers');
$xml->addAttribute('xmlns','http://www.microarea.it/XTech/1.0.0/XMLSchema');
the xml result is
<?xml version="1.0"?>
<Document xmlns="http://www.microarea.it/XTech/1.0.0/XMLSchema" documentname="DCustomers">
but the tag is reversed i need documentname="DCustomers" tag before in this way
<?xml version="1.0"?>
<Document documentname="DCustomers" xmlns="http://www.microarea.it/XTech/1.0.0/XMLSchema">
how can i do? thanks a lot!

Related Links

simplexml_load_file error in PHP 5.3
simplexml_load_file not a valid URI issue
Can't turn XML response into an simplexml object
Having trouble getting Fogbugz API response into a SimpleXML object
Upgraded to php 5.3.10 and simpleXMLelement is broken
Parsing RSS Feed with SimpleXML
php simplexml_load_file (script url) failed to open stream
PHP - SimpleXML not returning object
Having trouble processing XML with PHP SimpleXML
Simplexml How to access all element of the same node
simplexml_load_file failed to open stream Http request failed
Using XML node names with hyphens in PHP [duplicate]
SimpleXML Reading node with a hyphenated name
PHP simplexml Entities
PHP simplexml_load_string include form field data
how can i add the namespace name before the attribute in xml using simplexml

Categories

HOME
ibm-bluemix
google-chrome-extension
netsuite
openstack
magnific-popup
push-notification
google-oauth
react-redux
tizen-web-app
jsrender
echarts
ios-charts
upload
windows-10-universal
spring-kafka
dax
jsprit
telephony
highlight.js
tostring
serilog
xlsxwriter
opencover
web-sql
jndi
p-value
tdd
bootstrap-duallistbox
brunch
google-cloud-nl
madlib
google-cloud-endpoints-v2
contact-form
android-kernel
android-nestedscrollview
http-referer
serve
qwerty
android-browser
theano.scan
webix-treetable
janrain
node-gyp
mime
heightmap
sencha-touch-2.3
btrace
errordocument
dropbox-php
watchconnectivity
nested-sets
jquery-filter
home-directory
underscore.js-templating
trash
qpid
react-native-listview
suffix-tree
pagerank
php-parse-error
energy
intel-fortran
ruby-2.2
wyam
muse
sailfish-os
bigbluebutton
gadt
google-reader
doskey
seaside
jsctypes
tidy
odata4j
random-seed
orchardcms-1.7
distutils
anonymous-methods
unc
trusted
dice
twrequest
onsubmit
uiviewanimation-curve
osql
work-stealing
nsdatecomponents
joyent
yui-datatable
disclosure
w3wp.exe
dmx512
asp.net-profiles
nintendo-ds
exchange-server-2003
text-coloring

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App