Running into an issue about parse/select XML node,...
# suitescript
l
Running into an issue about parse/select XML node, It's working when there is no namespace in the XML. working
Copy code
const xmlDocument = xml.Parser.fromString({
                text: '<?xml version="1.0" encoding="UTF-8"?><StandardBusinessDocument><HeaderVersion>1.0</HeaderVersion></StandardBusinessDocument>'
            });

// Return [Node]
xml.XPath.select({
            node: xmlDocument,
            xpath: '//HeaderVersion'
        });
however, when the XML contain namespace it can't select using XPath NOT working
Copy code
const xmlDocument = xml.Parser.fromString({
                text: '<?xml version="1.0" encoding="UTF-8"?><StandardBusinessDocument xmlns="<http://www.qualifiednamespace.com/book>"><HeaderVersion>1.0</HeaderVersion></StandardBusinessDocument>'
            });

// Return []
xml.XPath.select({
            node: xmlDocument,
            xpath: '//HeaderVersion'
        });
Any idea is to appreciate