David Chu <[EMAIL PROTECTED]> writes:

> I defined a fairly complicated XML schema.
> My program parses the XML document based on my XML schema and use the
> information extracted from the XML document to config the program during
> run-time.
>
> I was surprise that in-order to extract a piece of information from the
> DOMElement, it took me about 10 to 20 sloc.
> For example, I need to invoke getElementByTagName() few times in-order to
> get to the node where the information reside, and then invoke
> getChildNode()->item(i) to get the value, after that, I need to use
> XMLString::transcode() to convert the result to cont char*.
>
> I wonder if I did anything wrong? or if there's a faster way to access
> information through the DOM tree.

Since you already have the schema you may want to give a try to a language
binding tool, e.g,:

http://codesynthesis.com/products/xsd/

It sure is a much faster and more enjoyable way of accessing information
stored in XML instance documents.


hth,
-boris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to