3

What are the recommended XML parsers for parsing a TMX file(XML based tilemap) in C?

What are the pros and cons of each, as I would like to have an efficient one because it will be running on an embedded system.

1
  • 1
    What type of embedded system, a msp430@8MHz with 64kB flash or a ARM11 imx31@500MHz with Linux and 1GB flash? Commented Mar 28, 2011 at 14:33

3 Answers 3

2

We used libxml on an embedded product a while back. It may be right for you.

Sign up to request clarification or add additional context in comments.

1 Comment

I've used libxml2 for embedded systems before as well. Works great!
1

On a high-level I think you should be looking at an event based parser rather than a DOM based one. DOM based parsers will take up a lot of memory building the XML tree.

Here's a from a similiar question. The top suggestion from that case looks to be one of the earliest xml parsers: Expat.

Comments

0

I have written sxmlc as a lightweight, potentially embeddable XML parser in C. See my answer on a related question (also linked by @PPC-Coder).

You can use it as DOM or SAX (to save memory), to parse either files or memory buffers.

1 Comment

A word of caution, repeatedly promoting your own project may get you flagged for excessive self-promotion - especially since these "recommend a library" questions are explicitly off-topic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.