aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xmerl')
-rw-r--r--lib/xmerl/src/xmerl_lib.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/xmerl/src/xmerl_lib.erl b/lib/xmerl/src/xmerl_lib.erl
index 7b76a76a33..1b3a7e57f0 100644
--- a/lib/xmerl/src/xmerl_lib.erl
+++ b/lib/xmerl/src/xmerl_lib.erl
@@ -148,9 +148,10 @@ expand_element(Element) ->
expand_element(Element, Pos, Parents) ->
expand_element(Element, Pos, Parents, false).
-expand_element(E = #xmlElement{}, Pos, Parents, Norm) ->
- Content = expand_content(E#xmlElement.content, 1, Parents, Norm),
- Attrs = expand_attributes(E#xmlElement.attributes, 1, []),
+expand_element(E = #xmlElement{name = N}, Pos, Parents, Norm) ->
+ NewParents = [{N,Pos}|Parents],
+ Content = expand_content(E#xmlElement.content, 1, NewParents, Norm),
+ Attrs = expand_attributes(E#xmlElement.attributes, 1, NewParents),
E#xmlElement{pos = Pos,
parents = Parents,
attributes = Attrs,