mglib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

fileio/

mg_xml_getdata.pro

includes main-level program

Returns an individual element or attribute's value.

Class description for mgffxmlitemparser

Inheritance

Properties

Properties in mgffxmlitemparser

_extra init

Routines

Routines from mg_xml_getdata.pro

mgffxmlitemparser::startElement, uri, local, name, attName, attValue
mgffxmlitemparser::endElement, uri, local, name
mgffxmlitemparser::characters, chars
mgffxmlitemparser::setItem, item
result = mgffxmlitemparser::getResult(found=found)
mgffxmlitemparser::cleanup
result = mgffxmlitemparser::init(_extra=_extra)
mgffxmlitemparser__define
result = mg_xml_getdata(input, item [, /found] [, /url] [, /xml_string])

Returns a specific element or attribute's value from an XML file.

Routine details

top mgffxmlitemparser::startElement

mgffxmlitemparser::startElement, uri, local, name, attName, attValue

Parameters

uri
local
name
attName
attValue

top mgffxmlitemparser::endElement

mgffxmlitemparser::endElement, uri, local, name

Parameters

uri
local
name

top mgffxmlitemparser::characters

mgffxmlitemparser::characters, chars

Parameters

chars

top mgffxmlitemparser::setItem

mgffxmlitemparser::setItem, item

Parameters

item

top mgffxmlitemparser::getResult

result = mgffxmlitemparser::getResult(found=found)

Keywords

found

top mgffxmlitemparser::cleanup

mgffxmlitemparser::cleanup

top mgffxmlitemparser::init

result = mgffxmlitemparser::init(_extra=_extra)

Keywords

_extra

top mgffxmlitemparser__define

mgffxmlitemparser__define

top mg_xml_getdata

result = mg_xml_getdata(input, item [, /found] [, /url] [, /xml_string])

Returns a specific element or attribute's value from an XML file.

Return value

string

Parameters

input in required type=string

filename, URL or actual contents of the XML to parse

item in required type=string

item from the file to retrieve; using the notation that / separates elements, [n] are used to indicate the nth element of that type, and . indicates an attribute, for example, in the file:

<numlist> <number>0</number> <number attr="int">1</number> <number>2</number> </numlist>
Then "/numlist/number[1].attr" returns "int". If no index is given, [0] is assumed.

Keywords

found out optional type=boolean

returns 1 if the item was found, 0 if not

url in optional type=boolean

set to specify that input is an URL

xml_string in optional type=boolean

set to specify that input is a string containing XML

File attributes

Modification date: Wed May 14 15:07:14 2014
Lines: 82
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.