V
V
vizaville2014-07-09 09:00:43
C++ / C#
vizaville, 2014-07-09 09:00:43

How to get attribute value by name in rapidxml?

<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<Level level="1">
  <box type_box = "BOX_RED" size_box = "BOX_1x1" x = "1" y = "1"/>
</Level>

How can one get the values ​​of the attributes type_box, size_box, x , y without looping over the attributes?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AxisPod, 2014-07-09
@AxisPod

Too lazy to read the documentation?

V
vizavill, 2014-07-09
@vizavill

I read it but didn't find it, I don't know much English

A
Andrew, 2014-07-09
@heart

std::string value = xml_element->first_attribute("name")->value();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question