Skip to content

Error parsing xml comment in package.xml #240

@ashwinvkNV-zz

Description

@ashwinvkNV-zz

Issue:
When a comment(eg: license) is added using the <!-- example_comment --> format before the tag in the package.xml file of a rviz plugin, pluginlib exits with the following error:
Could not find a root element for package manifest at
This is because the tinyxml2::XMLDocument function FirstChildElement("package") returns NULL when a XML comment is present before the "package" child element. https://github.com/ros/pluginlib/blob/ros2/pluginlib/include/pluginlib/class_loader_imp.hpp#L300

Branch: ros2

Commit Hash: b0388a8

Workaround:
Adding the comment using a non-existing processing-instruction works as expected.

eg:

<?comment
  example comment
?>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions