jmdavis / dxml

An XML parsing library written in D.
Boost Software License 1.0
32 stars 10 forks source link

parser.d(1925): [1:1]: Expected < #16

Closed bubnenkoff closed 5 years ago

bubnenkoff commented 5 years ago

I can't understand what I am doing wrong:

import std.stdio;
import std.file;
import dxml.parser;

string xmlName = r"D:\files\protocol_Moskva_2018060100_2018070100_019\fcsProtocolEF3_0173100006418000121_19138202.xml";
File file;
enum myconfig = makeConfig(ThrowOnEntityRef.no);

void main()
{
    writeln("Edit source/app.d to start your project.");
    file = File(xmlName, "r");
    string file_text = readText(xmlName);
    parseDoc();
}

void parseDoc()
{
    auto result = parseXML!myconfig(xmlName);
}

fcsProtocolEF3_0173100006418000121_19138202.zip

belka-ew commented 5 years ago

xmlName should be XML content itself, not a file name.

bubnenkoff commented 5 years ago

Thanks! All work!