I'm having a little trouble parsing XML. I'm trying to parse output from
Dell's SOAP inventory service
(see http://xserv.dell.com/services/assetservice.asmx?op=GetAssetInformation).
My example program tries to pull out relevant info and print out
CSV-formatted lines for each service agreement:
http://play.golang.org/p/nJSBNyCaXB
There's a number of things I'm unsure about:
- I'm reading a sub-element of the XML. Do I have to specify its parents in
a tag somewhere?
- Should I specify the namespace in every element, just the containing
elements, or at all?
- When parsing nested XML, should I tag the field in the containing struct,
or put an XMLname field in the substruct?
Unfortunately I have to parse a lot of nasty XML at my job. I would love to
be able to use Go to do it.
Cheers,
David
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.