cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Issue in converting rss feed to infotable

spatel-21
1-Visitor

Issue in converting rss feed to infotable

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

2 REPLIES 2
PaiChung
22-Sapphire I
(To:spatel-21)

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.

Announcements
Top Tags