-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve/clarify documentation concerning mxmlGetText vs. mxmlGetOpaque #190
Comments
I need to make this more visible somehow, it is by far the most frequently asked question when using Mini-XML... The MXML_TEXT type provides whitespace-delimited text values, so in your example there will be two child (text value) nodes: "abc" and "def". If you want to get opaque text strings then you want to use the MXML_OPAQUE type for children of your element. When loading the XML you can use the MXML_OPAQUE_CALLBACK callback or your own that returns MXML_OPAQUE for this particular element. Then you'll use mxmlGetOpaque(status) to get the string, including all whitespace, etc. |
@michaelrsweet There is definitely a need to add more information on this somewhere in the main documentation. I stumbled upon this problem too and it took me a while to figure it out. The solution in here actually helped me a lot. Thank you. |
OK, reopening to track documentation changes in the next update of Mini-XML... |
OK, aside from additions to the function references, I've updated the intro text to talk about using opaque strings by default. |
eg. <status>abc def</status>
The text was updated successfully, but these errors were encountered: