top_left top_right
bottom_left
Next Event: Unknown | Forum Rules | QGL Website | Event Registration
openFolder AusForums.com
iconwatfolderLineopenFolder LANs
iconwatfolderLineopenFolder QGL
iconwatfolderLineopenFolder QGL Forum
Author
Topic: XML question
TufNuT
I like eel pie
Posts: 3264
Location: Brisbane, Queensland
Hi Guys,

i have a question, i need to know what the easiest way is to to create a template in excel then have it export its data to specific xml feilds.

for example say my xml file has the following:

[JobPostings xmlns="Http://mycareer.com.au/schemas/2007-01-01" action="Replace"]
[JobPostings reference="327/04" style="normal"]
[JobTitle]
A title
[/JobTitle]
[JobDescription]
A Job
[/JobDescription]
[SearchHeadline]
A Search Line
[/SearchHeadline]
[SearchSummary]
A Summary
[/SearchSummary]
[BulletPoints]
[BulletPoint]Bullet Point1[/BulletPoint]
[BulletPoint]Bullet Point2[/BulletPoint]
[BulletPoint]Bullet Point3[/BulletPoint]
[/BulletPoints]
[/JobPostings]
[/JobPostings]

i need to create an excel sheet that will allow the users to enter all the information then export that info to that file.. any ideas of the best way to do this?
system
--
hot_potato_hot_potato
Posts: 7
Location: Wynnum, Queensland
any ideas of the best way to do this?

No
Some Fat Bastard
Posts: 140
Location: Brisbane, Queensland
and here I thought XML meant eXtraordinary Male Lingerie of which I was going to give you some very good advice.

last edited by Some Fat Bastard at 22:17:35 25/Jul/07
Habib
Posts: 90
Location: Brisbane, Queensland
Well I'm guessing excel has a feature somewhere for exporting to xml, but it may be difficult to get it to output stuff as you want it.

Easiest way I can think of would be to write a vbscript file, using the Excel.Application and MSXML objects to read through the excel data and write out the xml file. Google will be your friend here, heaps of stuff on the net about doing this sort of thing.
Jim
Posts: 6215
Location: Brisbane, Queensland
some fat bastard: pics or lying
Some Fat Bastard
Posts: 141
Location: Brisbane, Queensland
Jim: That was all before digital cameras and I don't have a scanner. I've since gotten into female lingerie.
Farseeker
Posts: 1373
Location: Brisbane, Queensland
I wanted to see how easily I could use ruby to make a web app that does this. turns out ruby xml templates rock (unsuprisingly):


xml.JobPostings :xmlns => "http://mycareer.com.au/schemas/2007-01-01", :action => "Replace" do
xml.JobPostings :reference => "327/04", :style => "normal" do

@job_postings.each do |job|
xml.JobTitle job.title
xml.JobDescription job.description
xml.SearchHeadline job.search_line
xml.SearchSummary job.search_summary

xml.BulletPoints do
job.bullet_points.each do |bullet|
xml.BulletPoint bullet.content
end
end
end
end
end


The big ugly bit was parsing an excel file (csv is easy, i wanted to try something different)

anyway, pm me if you'd like to have a look.
Mr Hardware
Posts: 1941
Location: Brisbane, Queensland
I've since gotten into female lingerie.
do they make lingerie big enough to fit you, sfb?
Some Fat Bastard
Posts: 142
Location: Brisbane, Queensland
^ bloody oath. You just gotta shop at all the 15+ womens stores. I tend to wear a dress and a wig when I'm shopping there. They always seem to catch me out though. I think it's the beard.
BigZub
Posts: 4703
Location: Brisbane, Queensland
this thread is filled with nerds...



HI NERDS.
Insom
Posts: 1686
Location: Brisbane, Queensland
oh hi fag
Opec
Posts: 4642
Location: Brisbane, Queensland
You will need to write a module/macro in your excel file and then access the MSXML object to write to the file.

Alternatively you can create the XML file manaually by writing all the tags etc yourself.
system
--
Not a new post since your last visit.
New Post Since your last visit
Back To Forum
Advertise with Us | Privacy Policy | Contact Us
© Copyright 2001-2026 AusGamers Pty Ltd. ACN 093 772 242.
Hosted by Mammoth Networks - Australian VPS Hosting
Web development by Mammoth Media.