Felicitas Posted October 7, 2021 Posted October 7, 2021 Dear Forum-Members, i´m trying to read the content from an .xml file with StringRegExp it works fine but is there an option to fill the array at empty spaces with something like a placeholder? my skript: $Dateiwahl=FileOpenDialog("Wähle XML-Datei!",@ScriptDir,"XML (*.xml)") Local $XMLSTRING = FileRead($Dateiwahl) $PosBeginn=StringInStr($XMLSTRING,"<Ntry>") local $Bank = StringRegExp($XMLSTRING,'<Id><IBAN>(.*?)</IBAN></Id>',3,$PosBeginn) I get a column with a lot IBAN´s. At some places nothing between <Id><IBAN>(.*?)</IBAN></Id> is found. For theses NULLS i want a Placeholder What it looks like: DE123455887136 DE125565881445 DE125668944552 DE125565699855 What it should look like: DE123455887136 DE125565881445 NULL or OTHER SPACEHOLDER DE125668944552 DE125565699855 Thank you :)
mikell Posted October 7, 2021 Posted October 7, 2021 Could you post an example of the content of the file ? There is actually nothing to work with
Felicitas Posted October 11, 2021 Author Posted October 11, 2021 Problem solved! When there is no information, the tag is missing. So i have to take the parent-tag... But thank you...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now