What is meant by NSXMLParserErrorDomain error 1549 - cocoa

I am trying to parse a xml document using NSXMLParser. Every time it result in NSXMLParserErrorDomain error 1549. I cant find any documentation regarding that error code.
Any help.
-Shakthi

This is probably a problem with resolving a DTD in the XML. Try disabling DTD downloading with this code:
[parser setShouldResolveExternalEntities:NO]

Related

IllegalArgument Exception : Unable to compile

I am getting IlleagalArgument Exception while retreiving Xpath for a particular node
I need to retrieve the below webpage link which follows the title WebPages ,I tried using the below expression but it is not able compile (Please see the comment section for the html )
page.getNode("//h3[. = 'Webpages:']/following-sibling::/ul[#class='list-entity-locations']/li/a/text()")
This is what I tried but got Exception
java.lang.IllegalArgumentException: Unable to compile
The right syntax is following-sibling::ul, not following-sibling::/ul.
To looking into html which you have posted there is no : text inside <h3>...</h3> tag.
Try the below code.
//h3[. = 'Webpages']/following-sibling::ul[#class='list-entity-locations']/li/a/text()

DAMAGE: after Normal block in deleting SAXParser xerces

I am working on an old MFC application which uses xerces 2.7 for XML parsing.
In debug mode, while trying to debug a stack corruption, I have been able to narrow down the issue to the following code:
BOOL CXMLHandler::LoadFile(CString fileName)
{
XMLPlatformUtils::Initialize();
SAXParser* parser = new SAXParser();
delete parser;
XMLPlatformUtils::Terminate();
return TRUE;
}
while deleting the parser, I get the error
"DAMAGE: after Normal block (#1695) at 0x0795EEA8."
the SAXParser class is from xerces.
I cannot figure out what is wrong with the code. Can anyone help in finding out what is wrong here. Could a memory leak/corruption elsewhere in the code be causing this?
If that #1695 is the same each time you run add the following to the start of the program:
_CrtSetBreakAlloc(1695);
Allocation number 1695 is the data that has been damaged. The debugger will halt there.

How to Use Query_Match for Soap UI

I am having trouble using the MockOperation Editor in Soap UI.
I have got this request:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<methodName xmlns="http://tempuri.org/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<dataAreaId>error</dataAreaId>
<pInvoiceList>
<dataAreaId>NOTTHESAME</dataAreaId>
...
</pInvoiceList>
</methodName>
</s:Body>
</s:Envelope>
I tried almost every XPATH expression but I always get "Missing match in request"
What to fill in the Xpath box?
I tried:
//dataAreaId/text()
//dataAreaId/
//dataAreaId
/dataAreaId/text()
/dataAreaId
/methodName/dataAreaId/text()
/methodName/dataAreaId/
/methodName/dataAreaId
I finally managed to get it based on the answer from user1740631
Seems I it had to do with namespaces afterall.
The correct syntax:
declare namespace tem='http://tempuri.org/';
//tem:methodName/tem:dataAreaId[1]
If you don't care about namespaces you can use the following syntax:
XPath1.0
//*[local-name() = 'methodName']/*[local-name() = 'dataAreaId'][1]
XPath2.0
//*:methodName/*:dataAreaId[1]
Write like this
For First One
//methodName[1]/dataAreaId[1]
For Second one
//methodName[1]/pInvoiceList[1]/dataAreaId[1]
*If you have multiple node with same name in Xml then you should use numbers to locate that particular node.
There is a good hint: When defining an Assertion for a Testcase (or maybe also in the Mock-Window) there is a button "Declare" above the XPath-Expression-Field. It doesn't really look like a button, until you point with the mouse-pointer at it, so I didn't realize it at first.
Just click on the button an SoapUI (actually I use 5.2.1) will add the declare-statements for you, that you can use.
I found that feature coincidentally, as it is not really visible. Maybe this can help also...

Dojo SyntaxError: missing ) in parenthetical

I have had this same error before and posted a question to that effect but unfortunately there was no answer. The previous error occurred under different circumstances ( ie I was triggered when I used the dojo toolkit sdk(Size 19M).
This time I am retrieving data from a couple of tables which have a one to many relationship. I am using Dojo, Doctrine and Zend Framework for my project. I have posted quite an extensive error message at 1 the Link to pastie.org with code and error details and the php and javascript that I identified as being the code involved.
When you look towards the end of the pastie in the FIREBUG ERROR MESSAGE section you will see a piece of JSON like
[{"id":"000001",
"name":"Adam",
"area_id":null,
"registration_date":"2011-03-08",
"loan_cycle":"0","credit_score":"100",
"created_by":null,
"borrowers":[{"id":"00000001",
"first_name":"Test",
"surname":"User",
"dob":"2006-12-09",
"personalid_no":"100000",
"gender":"Male",
"marital_status":"Marrie",
"home_number":"09866678",
"mobile_number":"09877655",
"accomodation_type":"owner",
"current_loan_cycle":"1",
"status":"Active",
"date_created":null,
"date_registered":"2009-12-11",
"created_by":null,
"Groups_id":"000001"}]
}]
Its clear that the data gets pulled from the tables. However the code fails and I get the error message SyntaxError: missing ) in parenthetical. I have battled with this for a long time now. Am at a point where I either have to abandon the application or restart the whole project again. Thanks for your help.

Format raw problem

recently I faced strange error with raw format:
index.php?option=com_content&view=category&layout=blog&id=44&Itemid=80&format=raw
Error 500:
View not found [name, type, prefix]: category,raw,contentView
I googled for this problem, but actually did not find the correct answer for this...
So what is wrong with that ?
Joomla version: 1.5.21
Your help would be appreaciated.
Perhaps try adding a view to your component e.g. view.raw.php

Resources