Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Exporting notebooks to xml (cnxml)

  • To: mathgroup at
  • Subject: [mg61831] Re: [mg61823] Exporting notebooks to xml (cnxml)
  • From: "G. Raymond Brown" <gbrown at>
  • Date: Mon, 31 Oct 2005 06:10:08 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at


My original submission was truncated.  The remainder is given below.


From: "G. Raymond Brown"
To: mathgroup at
Subject: [mg61831] [mg61823] Exporting notebooks to xml (cnxml)

> Mathgroup,
> I'm mostly a lurker on this listserv - my apologies for forgetting to
> fill in the subject field on the one response that made distribution. I
> have learned quite a lot about Mathematica by lurking.
> I would like some suggestions from the experts. I have Mathematica
> notebooks (in the Classroom style, designed for educational purposes)
> consisting mostly of text cells in the Section and Subsection levels,
> with numerous inline expressions and equations within the text cells,
> in TraditionalForm (slightly modified to retain some Mathematica
> conventions that I find heuristically useful, such as square brackets
> enclosing function arguments). Some cells at these levels are images
> (rendered graphics objects that I want to be linked to the main file as
> JPEG images). They also contain input and output cells, which are
> contained at the Subsubsection level.
> I'm using Mathematica Version in a Windows XP environment.
> I want to export the notebooks to XML + MathML files in the cnxlm
> described at I'd prefer that the cells at the
> Subsubsection level not appear in the exported XML file. (This is not a
> 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
> is an "integer that gives a unique serial number for this open

I=92m 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 fe
and id for use in NotebookObject?

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 do
not wish to repeat), the leading tags in the resulting file are:

<?xml version=3D=941.0=94 encoding=3D=94utf-8=94 standalone=3D=94no=94?>
<!DOCTYPE document PUBLIC =93-//CNX//DTD CNXML 0.5 plus MathML//EN=94
<document xmls=3D=94
xmlns:md=3D=94 =93

I can=92t 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.



  • Prev by Date: Re: Re: Re: Re: aggregation of related elements in a list
  • Next by Date: Re: Re: Question regarding Mathematica's treatment of whitespace
  • Previous by thread: Exporting notebooks to xml (cnxml)
  • Next by thread: preserving order of eigenvalues in a matrix diagonalization