A way to select a character at index point of tag??
Posted: Thu Dec 13, 2018 8:40 am
Hello everyone, I am somewhat new to XML and just begun using it A LOT at work. I have this problem I want to resolve but I am not sure if I can do this in XML. Basically, I want to take the very first character of a tag from incoming XML <App_Data App="MOD" Name="Episode_Number" Value="303"/> and assign it to another tag that is empty. I am trying to get the first character of Episode_Number which is 3 and represents the season number. I then want to put that into the season number tag but I am not sure how to go about that. My transform rule would look something like:
<input Episode_Number="*" Provider_ID="epix.com">
<Season_Number>Episode_Number.char(0)</Season_Number> **Episode_Number.char(0) is JAVA syntax because I dont know how else to express it**
</input>
Any advice would help. Please excuse my rookie-ness if I am posting in the wrong area or if this doesnt even make sense.
<input Episode_Number="*" Provider_ID="epix.com">
<Season_Number>Episode_Number.char(0)</Season_Number> **Episode_Number.char(0) is JAVA syntax because I dont know how else to express it**
</input>
Any advice would help. Please excuse my rookie-ness if I am posting in the wrong area or if this doesnt even make sense.