XML

Syndicate content 17 

I am trying to read an xml document using %XML.TextReader and that's is all well and l can get my elements values  but would like to determine where the next record start on the xml without referring to the document path in essence would like to use the same method to read different xml docs. I would like to know if is there a way or a function that I can use to get the start and end of a record in xml  as I would to get the start and end element.

Typical example  l would like to get the highlighted paths please note this would need to go for any xml doc

Last answer 20 December 2017 Last comment 20 December 2017
0   0 3
271

views

0

rating

This might be a very simple rookie question but I'm trying to create couple of web services in Ensemble and using  document below as my tutorial, I do manage to do it:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

But instead of doing it as described above, where method signature is like this:

Method GetCustomerInfo(ID As %Numeric) As ESOAP.SOAPResponse [WebMethod]

I would like it to be:

Method GetCustomerInfo(valid XML against schema1) As valid XML against schema2 [WebMethod]

because I'm trying to replicate a web service from another non-Intersystems platform and I have schema that web service request should follow and schema that web service response should follow

Last answer 30 November 2017 Last comment 17 December 2017
0   0 2
364

views

0

rating

I would like to write some code to parse a set of HTML pages from the internet in order to gather information from each web page.

All of the web pages are generated using a template, so the format of each of the web-pages is consistent with one-another and the information that I want to gather is always located in the same logical place within the page.

What is the best way to parse an html page in order to gather information at a specific place?

Can XML XPATH be used here?  Does anyone have any examples of parsing HTML content?

 

Last answer 1 June 2016 Last comment 15 December 2017
+ 2   0 2
803

views

+ 2

rating

I am trying to transform an Enlib.EDI.XML.Document through aXLT I know how to trans form the xml document  through a xlt stylesheet but been trying to get an Enlib.EDI.XML. Document from a procees by creating aoperation that will do the transformation of this to file if this can be done in a process all ideas welcome  so far I have come to this and I keep getting an erro

Last answer 7 December 2017 Last comment 14 December 2017
0   0 2
304

views

0

rating

I am using studio 2015 version which does not have dynamic objects and I need to read xml and convert that to a json I have managed to come close to json string but with little difficulties .I need to be able to identify the root element and specify where to put braces between objects  anyone  with any idea is welcome he is my code so far

Last answer 1 December 2017 Last comment 4 December 2017
+ 1   0 1
534

views

+ 1

rating

Hi everyone,

I'm having trouble parsing XML containing unicode characters which I receive from an external webservice. I believe my file is saved properly with UTF-8 encoding but the SAX Parser still throws me an error.

I have 2 classmethods: 1 general one (get) to make a request to a webservice and return the date, and 1 (getSportsPerDate) to make a specific call and then parse the data.

Last answer 10 November 2017 Last comment 11 November 2017
0   0 2
662

views

0

rating

I am using a %GlobalStream to create as % stream.Object and writing that to a file but for some reason when I run that on the terminal I get <PARAMETER>zWrite^%Library.GlobalCharacterStream.1 and no file is created

I have tried the following here is my code and still get the same result  any help  appreciate

Last answer 9 November 2017 Last comment 9 November 2017
0   0 1
794

views

0

rating

I have a DTL that reads an xml file and I want transform that to a list of objects but I have a problem looping through my xml as when I try I get the first instance on the xml not the whole XML being transformed. here is my example. Here is the output

 <s01:WardOccupancy>
<s01:WardOccupancy>
<Organisation>BYG</Organisation>
</s01:WardOccupancy>
</s01:WardOccupancy>
</msg>

fro

Last comment 9 November 2017
0   0 1
0

answers

266

views

0

rating

I have a batch record mapper that reads a csv file and passes the message to a process that uses the EnsLib.MsgRouter.RoutingEngine and would like to pass the message to an operation that will output that as a XML file but so far been unlucky as the operation that I use , uses the EnsLib.EDI.XML.Operation.FileOperation which only works with the messages("BusinessOperation class for writing XML messages to a file. Works with XML messages of type EnsLib.EDI.XML.Document.") is there a way to achieve this or somewhere to read in order to achieve this I have asked before on this post but the answers I got never helped  so any ideas appreciated thanks in advance

Last answer 25 October 2017
0   0 1
0

comments

370

views

0

rating

Hello,

 

I've been manipulating XML objects via Cache, but have had some difficulty understanding how to use the following method detailed within EnsLib.EDI.XML.Prop:

Method choiceGetCount(Output pCount, pDOMPath As %String, pRef As %String) As %Status 
 

From what I've read when walking through the code for this method, it appears to count a listing of repeating XML elements. However, despite my attempts to search for examples or attempts to implement this function, I am unable to do so.

 

Would anyone have any examples or ideas? Perhaps, at least, can someone tell me if I am using this function for its intended purpose?

 

Thanks,

-Mike

Last answer 17 October 2017 Last comment 17 October 2017
0   0 2
282

views

0

rating

I am trying to read a csv file and transfer it to a XML file without storing the objects to a database I have this code here doing the reading and have another method transferring the object read to a file but the reading one reads fine when it comes to the converting one I run to problems nothing happens any help appreciate

Last answer 13 October 2017 Last comment 13 October 2017
0   0 2
329

views

0

rating

I  have a business service that brings in a xml virtual document to the production and also a csv service  that brings in a csv file and have a process that transforms both to a xml output  but I have a problem with the csv as it is giving me this error when I try to trans form it ```ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnRequest+1 ^EnsLib.MsgRouter.VDocRoutingEngine.1 *DocType``` I have read here followed the suggestion but now I do not get any errors but my message is not being routed here is the rule set that I am usin

Last answer 12 October 2017 Last comment 13 October 2017
0   0 1
212

views

0

rating

I have an xml file that I read into objects and I am trying to print that file back in nested xml anyone with idea on how that can be achieved or where I can read in order to achieve this, here is an example of what I am trying to do.

From this

<Root>
  <FamilyMembers>
  <familyName>
  </familyName>
  <Name>
  </Name>
  <Age>
  </Age>
  <Employment>
  </Employment>
  </FamilyMembers>
</Root>

To this

<?xml version="1.0" encoding="UTF-8"?>
<Root>
  <FamilyMembers>
      <Family>
     <familyName>
        </familyName>
      </Family>
    <Name>
    </Name>
    <Age>
    </Age>
    <Employment>
    </Employment>
  </FamilyMembers>
</Root>

Last answer 10 October 2017 Last comment 10 October 2017
0   0 1
305

views

0

rating

HealthShare HealthConnect and Information Exchange version 15.03 support import transformations from C-CDA 2.1 to SDA. You can find these transforms in your installation's csp/xslt/SDA3 directory. For general information about import transforms, see "CDA Documents and XSL Transforms in HealthShare" in Overview of Health Connect.

Among the enhancements to import functionality added in connection with C-CDA 2.1 support is the ability to preprocess your C-CDA input files prior to the transformation done for import.

Preprocessing support can greatly simplify and reduce total processing time for transformations. Some possible use cases are

0   0 1
0

comments

429

views

0

rating

XDATA is used for a whole host of ISC libraries to store things like Zen pages, BPL logic and DTL transformations.

XDATA is the equivalent of XML config files of the JAVA world and JSON config files of the JavaScript / NPM world.

Whilst Atelier looks to shift source code to the disk, XDATA will remain a key component to source control our projects config / meta data.

I come across many developers who overlook XDATA, seeing it as an internal function of Cache and Ensemble and instead use globals to move meta data around, I've been there myself.

It might be because XDATA can feel a little clumsy to use, so here is an approach that I use that makes working with XDATA a breeze

Last comment 7 September 2017
+ 3   0 4
500

views

+ 3

rating

Hello,

Are there any utilities/api in HealthConnect 2016.2.1 that will allow conversion of XML virtual document to Json format? We were thinking to convert HL7 ADT message to XML via Ensemble DTL and then send it to another BP to convert to Json format for transmission via Web Services. To my understanding there isn't anyway to represent Json as a virtual object so it can be use for direct mapping of HL7 2.x message to Json via Ensemble DTL.

Thanks

Yuriy

Last answer 20 July 2017 Last comment 15 May 2017
0   0 1
1025

views

0

rating

In Cache Studio there is export class dialog with options "Export current project" and "Include dependent classes".

Is there any way to export class programmatically, but with same effect as if "Include dependent classes" was checked? So that not only the class itself is exported, but also all dependent classes? I know of Export method in %SYSTEM.Obj class, but it only exports the class itself.

Last answer 13 April 2017 Last comment 18 June 2017
0   0 5
319

views

0

rating

I'm using %SOAP.WebRequest to send SOAP requests:

  1. Populate %SOAP.WebRequest object (by setting Request and HeadersOut properties)
  2. Call SendSOAPBody method to send request

Currently the XML I send looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP-ENV:Header>
<SomeCustomHeader/>  </SOAP-ENV:Header>
  <SOAP-ENV:Body><SomeCustomBody/></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

However, I want XML to be generated differently:

  • No new lines
  • No whitespaces between <SomeCustomHeader/> and </SOAP-ENV:Header>

 

How can I tweak XML generation to achieve that?

Last answer 14 June 2017 Last comment 14 June 2017
0   0 5
269

views

0

rating

This is a translation of the following article. Thanks @Evgeny Shvarov  for the help in translation.

Let's assume that you wrote a program that shows "Hello World!", for example:

  write "Hello, World!"

The program works and everyone is happy.

With time, however, your program becomes more complex, gets more features and you eventually need to show the same string in different languages. Moreover you don't know the number and names of these languages.

The spoiler below contains a description of how the task of multi-language localization is solved in Caché.

Last comment 20 May 2017
+ 8   0 1
359

views

+ 8

rating

Hello 

I recently spent some time with Atelier, and tried to use it's inherited (from Eclipse) XSL transformation capabilities.

I have installed Exlipse XML Editor and Tools and Orangevolt XSLT - as it provides Saxon XSLT processor.

I have XSLT 2.0 transformation defined, that uses isc:evaluate() callback function to perform some server side code.

And here is my problem:  when I try to run XSL transformation of a file in my project, then as soon as the processor hits isc:evaluate() it fails. 

I have added all Cache jar's into Orangevolt XSLT confoguration, but apparently I miss something we do with %XML.XSLT2.Transformer class when we provide callback handler function.

Does anyone have experience / knowledge on how to configure the   XSL run environment so it calls to our callback?

here is console output, perhaps it helps you to explain what's going on....

Last answer 6 March 2017 Last comment 3 March 2017
0   0 0
293

views

0

rating

The task of handling office documents, namely docx documents, xlsx tables and pptx presentations is quite complicated. This article offers a way to parse, create and edit documents using only XSLT and ZIP.

Why? docx is the most popular document format, so the ability to generate and parse this format would always can be useful. The solution in a form of a ready-made library, can be problematic for several reasons:

  • library may not exist
  • you do not need another black box in your project
  • library restrictions : platforms, features, etc.
  • licensing
  • processing speed

In this article, I would use only basic tools for work with the docx documents.

Last comment 3 March 2017
+ 5   0 0
2428

views

+ 5

rating

I'll be doing my first xml transform soon and I'm hoping to find a good graphical mapping tool to generate the XSLT.  Does anyone have any recommendations?  I've tried the demo of Altova MapForce and it's exactly what I want but it's super expensive.  Working for a non-profit it would be nice if I could find a free or cheap solution.

Last answer 30 January 2017 Last comment 15 January 2017
0   0 5
1473

views

0

rating

Hello devs,

I'm facing an issue with one of my business services, which basically grabs a XML from a webservice (which in turn reads the data from the caché database) and does some processing afterwards. The XML content (which is formed of some of the table fields values) contains a special character: (left single quote)

Last answer 26 January 2017 Last comment 26 January 2017
0   0 3
555

views

0

rating