boostorg / boostorg/property_tree

property_tree/xml_parser is conceptually flawed, because it can't parse XMLs with the mix of texts and child trees

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
65
Forks
97
PR merge metrics
No merged PRs in 30d

Description

This XML:
```

Text1
a
Text2
b
Text3

```
parse result has all texts (Text1, Text2, Text3) combined into a single string that is available as the output of the ```data()``` function:
```
data="
Text1

Text2

Text3
"
```
and boost leaves no way to determine that `````` and `````` are in the middle of this text. ```tag1``` and ```tag2``` are available as separate keys, but this loses information about their location.

A larger practical example:
The line ```const GLfloat *v``` in https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml can't be parsed using ```property_tree/xml_parser``` because the `````` tag is between two text elements.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the XML example from the issue and inspect the property_tree XML parser behavior. Compare the result with the mixed-content structure in the sample and the param element in KhronosGroup/OpenGL-Registry's gl.xml. Done requires a decided representation that preserves the ordering of text and child elements, along with coverage for the reported cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.