Syntax

LdtpDataFileParser ('[XML Filename]')

Description

XML parser to parse data files.

Ref: ldtputils.py

Implementation

LdtpDataFileParser class takes Data XML filename as an optional argument. This class also provides 2 functions.

1. setfilename ('[XML Filename]'). If the class does not takes an argument, then this function should be used

2. gettagvalue ('tag name'). Get the value of the given tag.

Example

Example 1:

addr_book = LdtpDataFileParser ()

addr_book.setfilename ('evolution-ab.xml')

addr_book.gettagvalue ('AddressbookType')

Example 2:

addr_book = LdtpDataFileParser ('evolution-ab.xml')

addr_book.gettagvalue ('AddressbookType')

Sample XML File

NOTE: This XML can be easily generated using LDTP Editor !!!

Data XML File Parser (last edited 2006-05-19 12:27:42 by NagappanAlagappan)