Skip to content

Can't get skipToPath work on real data #18

@bubnenkoff

Description

@bubnenkoff

Basic example from docs works fine:

    auto xml = "<carrot>\n" ~
               "    <foo>\n" ~
               "        <bar>\n" ~
               "            <baz/>\n" ~
               "            <other/>\n" ~
               "        </bar>\n" ~
               "    </foo>\n" ~
               "</carrot>";

	auto result = parseXML(xml);	
	auto foo = result.skipToPath("foo/bar");
	writeln("foo: ", foo.front.name);

It's print foo: bar.

But on real data http://vpaste.net/omIST

I am trying to move to next section:

	auto foo = result.skipToPath("protocolLot/applications");
	writeln("foo: ", foo.front.name);

And getting print: foo: ns2:export. Why? What's wrong? I expected it will be moved to applications section.

Here is copy-past example:

    auto xml = "<carrot>\n" ~
               "    <foo>\n" ~
               "        <bar>\n" ~
               "            <ban>\n" ~
               "	            <baz/>\n" ~
               "            </ban>\n" ~
               "            <other/>\n" ~
               "        </bar>\n" ~
               "    </foo>\n" ~
               "</carrot>";


	auto result = parseXML(xml);	
	
	auto foo = result.skipToPath("bar/ban"); // problem is here

	writeln("foo: ", foo.front.name);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions