Open vinc17fr opened 4 years ago
In some cases, e.g. in some format conversions to XML, it is useful to know whether a string is a valid Name.
LibXML.xs
has a function to do such a check:LibXML_test_node_name
. But this function is not available in the public API. I suppose that a current solution would be to useXML::LibXML::Attr->new
and test whether the result is defined, but that's overkill and the behavior in case of invalid name is even undocumented. Thus a public version ofLibXML_test_node_name
would be useful.
@vinc17fr : I agree. Would you like to prepare a pull-req for that (with tests - see https://github.com/shlomif/what-you-should-know-about-automated-testing )?
In some cases, e.g. in some format conversions to XML, it is useful to know whether a string is a valid Name.
LibXML.xs
has a function to do such a check:LibXML_test_node_name
. But this function is not available in the public API. I suppose that a current solution would be to useXML::LibXML::Attr->new
and test whether the result is defined, but that's overkill and the behavior in case of invalid name is even undocumented. Thus a public version ofLibXML_test_node_name
would be useful.