We want to use the class XParser (for example.. (all the xml classes don't work)_ but, their is a compilation error because the class is not declared..
Their is an using to add?!
Thank you very much!!!
SlimerDudeSun 11 May 2014
Hi Lean,
Sorry, but I don't understand your question. What doesn't work? What class? Is there a stack trace?
To get you started, the following works okay:
using xml
class Example {
Void main() {
xml := "<hello/>"
doc := XParser(xml.in).parseDoc
echo(doc.root)
}
}
leanSun 11 May 2014
Thank you!
No, it's not working..
The error is with the "using": "using xml which is not declared dependency for myProject"
Do you know what should I do?
Thanks very much..
SlimerDudeSun 11 May 2014
You need to add a dependency on the xml pod to your project. Do this by altering your build.fan file so that depends looks like:
lean Sun 11 May 2014
Hey,
We want to use the class XParser (for example.. (all the xml classes don't work)_ but, their is a compilation error because the class is not declared..
Their is an using to add?!
Thank you very much!!!
SlimerDude Sun 11 May 2014
Hi Lean,
Sorry, but I don't understand your question. What doesn't work? What class? Is there a stack trace?
To get you started, the following works okay:
lean Sun 11 May 2014
Thank you!
No, it's not working..
The error is with the "using": "using
xml
which is not declared dependency formyProject
"Do you know what should I do?
Thanks very much..
SlimerDude Sun 11 May 2014
You need to add a dependency on the
xml
pod to your project. Do this by altering yourbuild.fan
file so thatdepends
looks like:See Pods and How To Setup a Fantom Project for more details.
lean Sun 11 May 2014
Thanks a lot!!!!! Your are awesome!! :)