Copy link to clipboard
Copied
Hi,
I have retrieved the XML file's specific content. However, there are a few bulletins and numbers included in some of these attribute values. The bulletins and numbering options have to be removed when I get the attribute value. Can you tell me how to accomplish this?
var inputXML = File("D:/XML/Parts.xml");
if(inputXML.exists == true) {
inputXML.open('r');
var text = inputXML.read();
var content = new XML(text);
var allFeatureElements = content.xpath("//features");
for(var n = 0; n < allFeatureElements.length(); n++){
if(allFeatureElements.children().length() > 0){
for(var c = 0; c < allFeatureElements.children().length(); c++){
if(allFeatureElements.children()[c].toXMLString().indexOf("<![CDATA[") == 0){
allCDATA.push(allFeatureElements.children()[c]);
}
if(allFeatureElements.children()[c].children().length() > 0){
getChildData(allFeatureElements.children()[c]);
}
}
}
}
}
Copy link to clipboard
Copied
Can you share your XML & some screenshot what you are actually trying to do?
Sunil