New answers tagged

0

That's not really an answer, the main point is left totally ununderstood, but it's an useful workaround. Suppose that xml data are: <test> <example>An example</example> <project>A project</project> <projectName>A project name</projectName> <projectDate>A project date</projectDate> </test> This ...


3

You should use Condition with StringMatchQ: Cases[dataXML, XMLElement[tag_String /; StringMatchQ[tag, "project*"], __], Infinity] because Cases doesn't support string patterns. As to why it is designed in such a way, I would cite Leonid Shifrin: I would say that the reason is dead simple <…>. Cases and DeleteCases work on parsed expressions, ...



Top 50 recent answers are included