View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Using XPath from MATLAB

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 3.39 KB File ID: #31382 Version:

Using XPath from MATLAB



09 May 2011 (Updated )

A simple example showing how to use XPath from MATLAB.

| Watch this File

File Information

An XPath package started shipping as part of Java 5, so we can use it from MATLAB. This is a simple example showing how to use XPath from MATLAB.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
13 Feb 2014 Ferdinando

Hi Matthew,

I need to extract data (e.g. all the noduleID) from my xml file, having a structure like the following (but with more 'unblindedReadNodule' nodes):

<?xml version="1.0" encoding="UTF-8"?>
<LidcReadMessage uid="" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<TaskDescription>Second unblinded read</TaskDescription>
<ResponseDescription>1 - Reading complete</ResponseDescription>
<noduleID>Nodule 001</noduleID>
<imageZposition>-125.000000 </imageZposition>

I tried to use your function, with only two appropriate changes:
doc = xmlread(which('myFileName.xml'));
expression = xpath.compile('//noduleID');
but I got no display!

Could you help me?

Thank you for your attention.


01 Sep 2016

Updated license

Contact us