Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Dear experts,
I've created a service to get rss feed.
I'm facing following error while converting an rss feed xml to infotable
Wrapped org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true. Cause: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
var params = {
proxyScheme: undefined /* STRING */,
headers: undefined /* JSON */,
ignoreSSLErrors: undefined /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: undefined /* BOOLEAN */,
withCookies: undefined /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: "http://www.ptc.com/feed/press", // http://www.usnews.com/rss/education
timeout: undefined /* NUMBER */,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: XML
var result = Resources["ContentLoaderFunctions"].GetXML(params);
logger.warn(result.channel.title);
for each (var item in result.channel.item) {
logger.warn(item.title);
}
Code is mentioned in above.
Please note different urls that I was trying
I've seen the doctype warning come up at times. unfortunately it's been a long time now so I can't exactly remember the issue. Doesn't look like you are doing something wrong. I recommend you put in a support ticket.
The problem is with this line
logger.warn(result.channel.title);
You need to remove the line as channel is undefined at that point.