Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


how to find the bullet points in the xml content

Explorer ,
Oct 27, 2021 Oct 27, 2021

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]);
}
}
}
}
}

Nithu
TOPICS
How to, Scripting

Views

44

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

LATEST

Can you share your XML & some screenshot what you are actually trying to do?

 

Sunil

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines