How to parse CCD/CDA document in Apache/Adobe flex? - apache

How to parse CCD/CDA document in adobe flex?
Is there any simple solution/Third party library to parse and show all the human readable part present in XML rather than iterating over each node and parsing it individually?
Now i am parsing it by iterating over each node and parsing meaning full data and showing it in UI.But iam not able to parse all the data for some XML document,since some of the XML have multiple children inside parent but some not,so need to check with all the scenario and need to do code accordingly? this creates lots of problem for me and issue in parser is not able fix at a time

Related

Updated JSON file is not reading during runtime

Team,
I have service to register a user with certain data along with unique mail id and phone no in JSON file format as a body (for ex: registerbody.json).
Before Post call I am generating unique mail id , phone no and updating the same json file (registerbody.json) fields which is in the same folder where feature file locates. I see the file is updated with the required data during runtime.
I used read () method and performed POST request
Surprisingly read method is not taking updated JSON file instead it is reading old data in the registerbody.json file.
Do you have any idea on this, why it is picking up old data even though file is updated with the latest information?
Please assist me with this.
Karate uses the Java classpath, which is typically target/test-classes. So if you edit a file in src/test/java Karate won't see it unless it is copied. This copying is automatically done when you build / compile your code.
My suggestion is use target/ as a temp folder and then you can read using the file: prefix:
* def payload = read('file:some.json')
Before Post call I am generating unique mail id , phone no and updating the same json file (registerbody.json)
You are making a big mistake here, Karate specializes in updating JSON based on variables. I suggest you take 5 minutes and read this part of the docs VERY carefully: https://github.com/intuit/karate#reading-files
Especially the part about embedded expressions: https://github.com/intuit/karate#embedded-expressions

How can i use the Mule Studio data mapper for producing output generated from a complex XSD schema ?

I want to post a message to a SOAP webservice with MULE Enterprise edition.
For creating the Request object i am using a data mapper with the
input a POJO and for
the output i selected XML , and from example XML schema i added my own XSD.
Because there are a lot of elements in the xsd, i selected the root element from the list provided.
Then i am dragging the fields from input to the corresponding values i want in the output.
(i also tried to map just one field, to be sure that i keep the minimum the probability for error).
And now the problem:
when the flow is accessed, the following WARN is shown and the data-mapper fails
*[XML WRITER:EXT_XML_WRITER0] - Invalid mapping (With port binded to root element, result might contain multiple root elements. Such XML is not well-formed. To avoid that, set 'Records per file' or 'Max number of records' component attribute to '1'.)*
Where can i set this kind of options in the data mapper ?
And also i want the root element to be only one, i don't need a foreach for the root element, i just need to fill the contents of it. Can i specify this anywhere in the data mapper ?
Thanks.
Mule EE DataMapper uses CloverETL for data transformations, and this annoying warning concerns CloverETL settings. I don't know if you can advise CloverETL to use a specific configuration file in the context of Mule DataMapper, but you can always edit the mapping file generated by Mule with a text editor. Just find your root Node entry in the mapping file and add recordsPerFile="1" attribute.
The problem with this is that Mule may overwrite your manual edits if you use the graphical editor, though.
Check out the Anypoint Studio May 2014. Mule now includes a new Web Service Connector for posting messages to a SOAP web service using just a WSDL. Studio will read the XML Schema from the WSDL and automatically create the metadata for DataMapper for you. See http://www.mulesoft.org/documentation/display/current/Web+Service+Consumer for more details.

How to set http headers in dotCMS

I'm trying to create a XML data feed with dotCMS. I can easily output the correct XML document structure in a .dot "page", but the http headers sent to the client are still saying that my page contains "text/html". How can I change them to "text/xml" or "application/xml"?
Apparently there's no way to do it using the administration console. The only way I found is to add this line of (velocity) code
$response.setHeader("Content-Type", "application/xml")
to the top of the page template.
Your solution is the easiest. However there are other options that are a bit more work, but that would prevent you from having to use velocity to do the XML generation, which is more robust most of the time.
DotCMS uses xstream to generate XML files (and vise versa). You could write a generic plugin to use this as well.
An JSONContentServlet exists in dotCMS that takes a query and generates json or xml (depending on your parameters). It is not mapped on a servlet by default, but that is easy to add.

Sharing Data bwtween different AppDomain

I'm trying to sending data from newDomain to cureentDomain.
I used DoCallBack for loading list of .dll and extract file&assembly information as Dictionary type.
And tried to send key/value data to currentDomain.
It's my first time to use appDomain, so I just found rough way, Set/GetData.
For using that, too much converting process needed, and it shows it can make exceptions in a variety of situations.
If I can send Dictionary, it will be very excellent way of that.
Please, let me know~

XML Parser problem

i have to parse data xml.
any one suggest me a simple parser so i can get the data. please don't suggest of ASIHTTPrequest method..
In my xml file there are tad's in which data contain [CDATA] block. iseen this first time i get the null value for this tag
At this link you will find a list of popular XML parser libraries for iOS and differences between them. I used TouchXML in my apps and it was really easy to use.
ASIHTTPrequest is not a parsing library, it's a wrapper for the CFNetwork API. It is used to perform basic HTTP requests and interacting with REST-based services (GET / POST / PUT / DELETE).