xml


xml record id with one increment


See the image above, each time I would like to increment my record with 1 so I get the xml file as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<record1>
<LastName>Smith</LastName>
<Sales>16753</Sales>
<Country>UK</Country>
<Quarter>Qtr 3</Quarter>
</record1>
<record2>
<LastName>Johnson</LastName>
<Sales>14808</Sales>
<Country>USA</Country>
<Quarter>Qtr 4</Quarter>
</record2>
</data-set>
How is this possible in Excel?
Add a column to your spreadsheet that indicates the row number, give it a header of "RowNumber", then include it in the range you are exporting.
Exporting them as "", "" will cause problems for the programs that will use that XML in the future, because it will see them as different types of rows.
Is there any particular reason you want that xml structure? I would recommend something like an id tag.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<record>
<id>1</id>
<LastName>Smith</LastName>
<Sales>16753</Sales>
<Country>UK</Country>
<Quarter>Qtr 3</Quarter>
</record>
<record>
<id>2</id>
<LastName>Johnson</LastName>
<Sales>14808</Sales>
<Country>USA</Country>
<Quarter>Qtr 4</Quarter>
</record>
</data-set>

Related Links

Xml schema uniqueness in entire subtree
dynamic xml nodes using xslt
xpst0003 xquery syntax error
Xsl anchor attribute
How to get start and end of a week of a specific date using xslt?
how to select elements when the root element has a lot of attributes
xsd select multiple values from enumeration or equivalent type
Issue with XSL loops and linefeeds
what is the xpath of this element
Openerp module output not generated properly
trasfer one excel sheet into multiple xml content in mule
R : Get attribute value from an XML
How to use the ref attribute without allowing multiple roots
XSLT - Multiple parent groups of same name
multiple attributes in different combinations
XML Read to Array in Autoit

Categories

HOME
grok
localization
developer-tools
ng-idle
merge
youtube-data-api-v3
access
soa
jquery-ui
qpython
commonjs
libc
supervisor
do-while
aws-sdk
firefox-addon
chargify
replication
visual-glitch
ksh
dataflow-diagram
firebase-analytics
twiml
userdefaults
livelink
record
laravel-eloquent
python-import
processwire
latitude-longitude
sim-toolkit
lint
hackintosh
mcustomscrollbar
plaintext
install.packages
facebook-social-plugins
servermanager
ntvs
configurationmanager
tf
manova
payara-micro
aquamacs
context-switch
scalding
modelsim
android-testing
filehandle
type-theory
gameplay-kit
cronexpression
node-request
angular2-testing
flex-monkey
burrows-wheeler-transform
uicolor
udpclient
freepbx
omniauth-facebook
cycle2
inf
concurrentmodification
botan
alloy-ui
google-refine
nsurlsessiondatatask
entity-framework-4.3
osc
mruby
viewer
pseudo-class
rickshaw
winginx
artemis
asdf
octal
cascadingdropdown
pstack
zope.interface
garbage
fitbounds
luabind
denied
django-paypal
binomial-heap
ajax-polling
lxr
google-wave
fail-fast-fail-early
entitykey
image-capture

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