MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Exporting notebooks to xml (cnxml)

  • To: mathgroup at
  • Subject: [mg61864] Re: [mg61852] Re: Exporting notebooks to xml (cnxml)
  • From: "G. Raymond Brown" <gbrown at>
  • Date: Wed, 2 Nov 2005 04:09:34 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Thanks, Steven,

I will follow your tips and redirect my efforts.  I was afraid the answer
might be something like this.  My task is not _really_ what Mathematica
is about.

BTW, now I understand why the moderator truncated my original posting.
I'll be more careful in the future.


Stephen T Hatton wrote:

G. Raymond Brown wrote:

> Mathgroup,
> My original submission was truncated. The remainder is given below.
> -GRB-
> From: "G. Raymond Brown"
To: mathgroup at
> Subject: [mg61864] [mg61852] Exporting notebooks to xml (cnxml)

>> I'm using Mathematica Version in a Windows XP environment.
>> I want to export the notebooks to XML + MathML files in the cnxlm
> flavor
>> described at I'd prefer that the cells at the
>> Subsubsection level not appear in the exported XML file. (This is not
>> big deal - I can easily edit them out.)
>> I'm having some trouble understanding the help documentation for the
>> Export function. The syntax is Export[file.ext,expr]. The expr needed
>> appears to be NotebookObject[fe,id], where fe is a FrontEndObject and
> id
>> is an "integer that gives a unique serial number for this open
> notebook .
> I'm running only one FrontEnd (the one that opens when I click on the
> Mathematica icon on my Dell laptop). How do I determine the values of
> and id for use in NotebookObject?

Have a look at "Manipulating Notebooks" in The Mathematica Book (on-line
help). You may find it's more trouble that its worth as a means of
obtaining your immediate goals.

> Also, what should I set for ConversionOptions? For a previously
> successful conversion (using MS Word as an intermediary and laboriously
> inserting the MathML expressions by hand, one-by-one, an experience I
> not wish to repeat), the leading tags in the resulting file are:

For the most part, Mathematica isn't going to do a lot for you. You have
program it to so anything other than exporting the XML formats it already

> <?xml version 1.0 encoding utf-8 standalone no ?>
> <!DOCTYPE document PUBLIC -//CNX//DTD CNXML 0.5 plus MathML//EN
> >
> <document xmls
> xmlns:md
> xmlns:m
> id none >
> I can't even read this, much less understand it, which pretty well
> establishes my level of understanding of XML. But I think it tells me
> what should appear in ConversionOptions.
> Any help is greatly appreciated.

Punt. I could be wrong, but at this point you would probably be better
trying to edit the xhtml by hand. I just found this little gem online. It
should greatly accelerate your learning of XML.
It will probably be of far more immediate use to you than Mathematica
be. There's a 30 freebe, which you can use for learning, but if you
publish, you are obligated to pay. They also have academic discounts, but
I don't know what they are.

Buy this book, and read it with your favorite text editor opened.:

G. Raymond Brown, Ph.D.
Scientific Program Coordinator
Division of Science and Mathematics
Morehouse College

  • Prev by Date: Re: Error: Prime::intpp: Positive integer argument expected in Prime[16.`]
  • Next by Date: Re: Re: MLPutRealList vs. sequence of MLPutDouble
  • Previous by thread: Re: Exporting notebooks to xml (cnxml)
  • Next by thread: Re: Re: Exporting notebooks to xml (cnxml)