XMLReader icon indicating copy to clipboard operation
XMLReader copied to clipboard

Difference in result dictionary between old XMLReader and current

Open Ku6ep opened this issue 12 years ago • 1 comments

Can I get result dictionary like on old version of XMLReader?

NSString *xmlString = @"<items><one id=\"1\">1</one><two><some>Test</some><some>Test2</some></two><three id=\"3\">3</three><four>4</four></items>";

Old XMLReader output

{
    items =     {
        four = 4;
        one =         {
            "@id" = 1;
            text = 1;
        };
        three =         {
            "@id" = 3;
            text = 3;
        };
        two =         {
            some =             (
                Test,
                Test2
            );
        };
    };
}

New XMLReader output:

{
    items =     {
        four =         {
            text = 4;
        };
        one =         {
            id = 1;
            text = 1;
        };
        three =         {
            id = 3;
            text = 3;
        };
        two =         {
            some =             (
                                {
                    text = Test;
                },
                                {
                    text = Test2;
                }
            );
        };
    };
}

Ku6ep avatar Jun 18 '13 15:06 Ku6ep

I assume that you have figured out a solution to your problem.

Nevertheless, could you explain me what was the "old XMLReader" you were referring to? I've looked through the commits and kXMLReaderAttributePrefix has never been used in this repository. I cannot explain how you got the "@" prefix for XML attributes.

Sorry for the delay and thanks for your help.

amarcadet avatar Mar 23 '14 19:03 amarcadet