Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing FastXml.parse xml with doctype and parsed character data type nodes #325

Open
k0t0vich opened this issue Jan 12, 2018 · 0 comments

Comments

@k0t0vich
Copy link

Xml for example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE connection-config SYSTEM "http://www.game.ru/xml/cc/connection-config.dtd">
<connection-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.game.ru/xml/cc/connection-config.xsd">
    <connection-entry type="game" host="game.ru" ports="14444" description="test-server" />
	<config-entry type="game"  money5="enable"  shmup="disable" />
</connection-config>

FastXml.hx fix:

   public static function parse(s:String) : FastXML {
        var x = Xml.parse(s);
        if(x != null)
        for(node in x) {
            if( node.nodeType == Xml.Document || node.nodeType == Xml.Element )
                return new FastXML(node);
        }
        return null;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant