Read XML File
Hey,
I have some trouble reading an XML File with Vuforia Studio.
- The first way is the XML DOM. I have downloaded the library from here and Imported the .js files like: $scope.app.fn.loadResourceScript("Uploaded/dom-parser.js"); Do I have to create an Object from the class dom-parser in my Home.js to call the methods?
- Another way was to read the XML File with the XMLHttpRequest() and save the content in a variable. This is working fine. In the XML File I have the Elements SopItemTitleText (Title), ItemText (Text, like a description) and Filename (name of an image). The ItemText contains sometimes line brakes. I was reading the string of the XML File with e.g. string.match(/<SopItemTitleText>(.*?)</g); and save its content in an Array. I delated <SopItemTitleText> and < from every entry of the Array. Unfortunately string.match(...) doesn't work, when the <SopItemTitleText> contains linebreaks.
Is there a way to import a library in the trial version of Vuforia Studio? Or reading the complete String between <SopItemTitleText> and < with the line breaks?
Another problem I had was with the CSS script. How can a textarea dynamically change the height in the context of the content in the textarea? The StudioID is textAreaWI. I was trying the following script:
textArea{
margin-top: 10px;
resize: none !important;
background-color: rgba(255,255,255,0.4) !important;
overflow: hidden !important;
font-size: 14px !important
max-height: 100% !important;
height: auto !important;
}
Is there also a way to mark only the text with the same background-color?
Thank you so much for your help!

