FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Parsing XML and JSON documents

Description
The parsing routines 'xmlparse' and 'jsonparse' expect tables of (optional) functions implemented by the Mosel model in order to return detailed information about each node of the document without any prior knowledge of the document structure.

Within Mosel, JSON documents are represented as XML trees.

Further explanation of this example: 'Mosel Language Reference', Chapter 'mmxml'


Source Files

Data Files





refexample.xml


   
     
      2001
      Jean
      
Paris
French English Spanish
2010 Lisa
London
English French
2005 Tom
Berlin
German English Russian
2005 Pedro
Madrid
French Spanish English
2004 Paolo
Milano
English Italian
2003 Keiko
Tokyo
English Japanese
2009 Yiping
Shanghai
Chinese English
2006 James
Singapore
Chinese English
2011 Bill
New York
English
2011 Sarah
San Francisco
English Spanish
2008 Joao
Rio de Janeiro
Portuguese Spanish English
Back to examples browserPrevious exampleNext example