This topic explains how to build a DOM tree by parsing an XML file.
Before you start, you must:
understand the concept of Document Object Model (DOM)
understand the architecture and classes of the XML DOM Engine component
prepare an XML file containing valid XML data
XmlEnginePushL();
Initialise your
instance of the [[[ERROR: [NOKX000E] Unable to find definition for key reference 'XML']]]RXmlEngDOMImplementation class
by calling its OpenL()
method.
RXMlEngDOMImplementation impl; impl.OpenL();The
RXMlEngDOMImplementation
instance is the DOM Engine.
RXmlEngDOMParser parser; parser.Open( impl );You can also have several parsers registered on a DOM Engine instance.
RXmlDocument myDoc = parser.ParseFileL( "tutorial.xml" );The
myDoc
object is a DOM tree containing the data
from the XML file.
Close the parser
and the engine by calling their Close()
functions.
parser.Close(); impl.Close();