Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9487
| From | Murta <rodrigomurtax@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Extract XLM data from in Mathematica |
| Date | 2012-04-06 09:58 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jlmene$mdp$1@smc.vnet.net> (permalink) |
| References | <jl150v$lcf$1@smc.vnet.net> <jl3uhv$3f1$1@smc.vnet.net> |
On Mar 30, 6:31 am, Chris Degnen <deg...@cwgsy.net> wrote:
> It looks more complicated than it is. I was able to do
> everything I needed with just two commands. E.g.
>
> retrievedXML = ImportString[XMLdataRecord, "XML",
> "NormalizeWhitespace" -> False];
>
> {numbers} = Cases[retrievedXML,
> XMLElement["telephonenumbers", _, _],
> Infinity] /. XMLElement[_, _, {val_}] :> val;
>
>
>
>
>
>
>
> On Thursday, March 29, 2012 9:03:43 AM UTC+1, Murta wrote:
> > Hi All
>
> > I was trying to extract some data from a XML using Mathematica and
> > I discovered that it's terribly complicated, with a lot of pattern
> > inside pattern.
> > I was using this reference to guide me:
> > http://reference.wolfram.com/mathematica/XML/tutorial/TransformingXML...
> > There is some package to make life easier?
>
> > tks in advance
> > Murta
Tks for your answer Chris, but for deeper level XML the notations get
cryptcal and unreadable.
I get some tips in Mathematica Cookbook XML part (page 212 from
printed version).
One simple one that I liked was this:
cleanedXML = Apply[List,dataXML,{0,Infinity}]
It make the XML much more clean to read.
best Regards
Murta
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Extract XLM data from in Mathematica Murta <rodrigomurtax@gmail.com> - 2012-03-29 08:03 +0000
Re: Extract XLM data from in Mathematica Chris Degnen <degnen@cwgsy.net> - 2012-03-30 09:31 +0000
Re: Extract XLM data from in Mathematica Murta <rodrigomurtax@gmail.com> - 2012-04-06 09:58 +0000
Re: Extract XLM data from in Mathematica A Retey <awnl@gmx-topmail.de> - 2012-04-07 09:56 +0000
csiph-web