Hi D
I'm using the dxml library since I like it's "pull here for more data" mentality. I've come across the need to save an entity range created by the parseXML function as a class member so that I can tuck it away and pull more data as needed.
Like almost all new users to D I'm tripping over how to save and pass around variables since nothing has an understandable type anymore and you can't use "auto" for class member storage types.
Any ideas on how to get the return type of parseXML below:
import dxml.parser;
const(char)[] _mmfile;
//_mmfile initialization
TYPE??? _entityRng = parseXML!(simpleXML)(_mmfile);
before calling parseXML, so that it can be a class member variable?
I've tried variations on typeof and .inputRangeObject etc. with no success so far.
Thanks for any advice :)
All this would be so much easier if dxml just defined Entity at the top level of the parser module instead of burying it inside a templated struct. Then the type could just be InputRange!Entity which is easy to work with.
Permalink
Reply