Re: [Jolie-devel] XML support / documentation
A service-oriented programming language.
Brought to you by:
fmontesi
From: Matthias D. W. <mwa...@ya...> - 2013-12-22 10:44:56
|
Hi Claudio, with this patch we get schema validation, but still no type conversion. Cheers, Matthias Matthias Dieter Wallnöfer schrieb: > Hi Claudio, >> Claudio Guidi schrieb: >> >> >> 2013/12/21 Matthias Dieter Wallnöfer <mwa...@ya... >> <mailto:mwa...@ya...>> >> >> Hi devs, >> >> for my project I would like to acquire an XML (configuration) file. >> "content" and "conf" are free variables. >> > with (readFileRequest) { >> > .filename = configFile >> > }; >> > readFile@File(readFileRequest)(content); >> > content.options.includeAttributes = true; >> > xmlToValue@XmlUtils(content)(conf); >> This works smoothly although I got two questions: >> >> - what does "includeAttributes" mean? >> >> xml conversion doesn't add attributes values by default. If you want >> to add also attributes value you need to set includeAttributes to >> true. If it is true you will find subnodes @Attributes which contain >> the attributes of the xml you are converting > so this means if I have <tag a="x" b="y">...</tag> to include "a" and > "b" as well? >> - does there exist a way to perform a XSD parsing as well? Do I >> need to >> include some tag in the XML file to make this happen? >> >> >> if you want to convert the xsd in a value just read the xsd file (it >> is an xml file and it will be converted by the xmlToValue). >> >> If you want to convert the xsd into Jolie type declaration there is >> not a javaservice which does it but you could implement it starting >> from the code of wsdl2jolie > Yes, I have looked over this code but without help I still feel a little > incapable to extend it. Basically there needs to be performed the > "setSchema()" call on the DocumentBuilder object before invoking > "parse()" in "xmlToValue()". Maybe we could pass down the schema as > content (like the XML content) using "request.options.schema". > But what is the right call to the xsd2jolie converter? > > Just to not forget: What about my other two patches for wsdl2jolie? > > Cheers, > Matthias >> Cheers >> Claudio >> >> >> I am sorry, but the documentation >> (http://www.jolie-lang.org/?top_menu=documentation&sideMenuAction=jsl/XmlUtils) >> is very superficial in this area. >> >> Cheers, >> Matthias >> >> >> ------------------------------------------------------------------------------ >> Rapidly troubleshoot problems before they affect your business. >> Most IT >> organizations don't have a clear picture of how application >> performance >> affects their revenue. With AppDynamics, you get 100% visibility >> into your >> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of >> AppDynamics Pro! >> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >> _______________________________________________ >> Jolie-devel mailing list >> Jol...@li... >> <mailto:Jol...@li...> >> https://lists.sourceforge.net/lists/listinfo/jolie-devel >> >> > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Jolie-devel mailing list > Jol...@li... > https://lists.sourceforge.net/lists/listinfo/jolie-devel |