-
Notifications
You must be signed in to change notification settings - Fork 52
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
XmlEventAttribute is missing namespace #54
Comments
Actually, it looks like this is the case for XmlEventStartElement too... the |
True, I had it like that in my initial attempt where I reused the normal DOM nodes. The problem with To keep events lightweight it would probably be the simplest to add separate accessors for the local name, the qualified name (what is currently returned), and the namespace prefix? |
What do you think about adding the following mixin to the events with name: abstract class XmlNamed {
/// The fully qualified name.
String get name;
/// The namespace prefix, or `null`.
String get namespacePrefix {
final index = name.indexOf(XmlToken.namespace);
return index > 0 ? name.substring(0, index) : null;
}
/// The local name, excluding the namespace prefix.
String get localName {
final index = name.indexOf(XmlToken.namespace);
return index > 0 ? name.substring(index + 1) : name;
}
} |
If this is ok, I can make a new release with e6c0458? |
I've released this as 3.3.1 on pub. |
Attributes can be in a specific namespace - the API doesn't support this currently.
The text was updated successfully, but these errors were encountered: