I'm new to xml and having an issue listed below:
I have a sample xml file:
<?xml version="1.0" encoding="utf-8"?>
<tt xml:lang="en" xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling"
xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns:ttm="http://www.w3.org/ns/ttml#metadata"
ttp:profile="http://www.netflix.com/ns/ttml/profile/nflx-tt" ttp:frameRate="24"
ttp:frameRateMultiplier="1000 1001" ttp:dropMode="nonDrop" ttp:timeBase="smpte">
<head>
<styling>
<style xml:id="style.default" tts:fontFamily="Arial" tts:fontSize="100%" tts:fontStyle="normal" tts:fontWeight="normal" tts:backgroundColor="transparent" tts:color="white" />
</styling>
<layout>
<region xml:id="region.after.center" tts:displayAlign="after" tts:textAlign="center" tts:origin="10% 10%" tts:extent="80% 80%" />
</layout>
</head>
<body>
<div xml:lang="en">
<p begin="00:03:14:09" xml:id="p62" end="00:03:16:23" region="region.after.center" style="style.default">And that was it.<br />That was his story, right?</p>
<p begin="00:03:18:14" xml:id="p63" end="00:03:19:16" region="region.after.center" style="style.default">
<span tts:fontStyle="italic">So now...</span>
</p>
</div>
</body>
</tt>
Now I have a simple xpath : `//*[starts-with(name(),'d')]` so it selects all elements under the div tag.
The problem is when evaluating the expression against the xml, I get
`xmlns="http://www.w3.org/ns/ttml"` in all `<p></p>` tags and also I get `xmlns:tts="http://www.w3.org/ns/ttml#styling"` in all `<span></span>` tags. Bewlo is a sample result of what is returned:
<p begin="00:00:34:23" xml:id="p2" end="00:00:36:00" region="region.after.center" style="style.default" xmlns="http://www.w3.org/ns/ttml">That was his story, right?</p>
<span tts:fontStyle="italic" xmlns:tts="http://www.w3.org/ns/ttml#styling">But there’s a woman there<br /> So now...</span>
so, is there is something wrong in the xml structure itself?
when adding prefix to `xmlns="http://www.w3.org/ns/ttml"` I do not get it in `<p></p>` tags but still getting xmlns in the `<span></span>` tags.
I appreciate if someone can help me out with this. Thanks in advance