Article
· Dec 27, 2018 2m read
Use %XML.Node to walk a DOM

The following code walks a DOM using %XML.Node. It also prevents %XML.Writer to change whitespace. Run the code using the class method "test":


Class objectscript.walkDOM Extends %Persistent
{
    ClassMethod dfs(node As %XML.Node)
    {
        s entrynode=node.NodeId
        do {
        //element nodes with one whitespacetyped child are the ones we want to change
        if (node.NodeType=$$$xmlELEMENTNODE){
            s snode=node.NodeId     
            if (node.MoveToFirstChild())            
                {
                    i ('node.MoveToNextSibling()){
                        i (node.NodeType=$$$xmlWHITESPACENODE){
                            s node.NodeType=$$$xmlTEXTNODE
                            s node.NodeId=snode
                        }
                    }
            }
            s node.NodeId=snode     
        }   
        if (node.HasChildNodes()){
            d node.MoveToFirstChild()
            d ..dfs(node)
        }
        } while (node.NodeType'="" && node.MoveToNextSibling())
        s node.NodeId=entrynode
         
    }
     
    ClassMethod test()
    {
      set xml = "abcdefg"
     
      s reader=##class(%XML.Reader).%New()
      do reader.OpenString(xml)  
      set writer = ##class(%XML.Writer).%New()
      //do some magic
      d ..dfs(reader.Document)
       
      w !,"with indent=1:",!
      set writer.Indent = 1
      do writer.OutputToString()
      do writer.Document(reader.Document)
      w writer.GetXMLString()
      set writer.Indent = 0
      w !,"with indent=0:",!
      do writer.OutputToString()
      do writer.Document(reader.Document)
      w writer.GetXMLString()
    }
}

Here's a link to the code on GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/...

1 0
0 333

Hi, Community!

Check a new session recording from Global Summit 2017:

Mirror, Mirror, Which Should I Choose?

https://www.youtube.com/embed/NmMfE14RdDs
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

2 0
0 319

Hi, Community!

This is a digest of the Developer Community postings in July 2018.

Most viewed

Atelier and Studio 1070

Caché and Ensemble 2018.1 Field Test Release 268

GraphQL for InterSystems Data Platforms 191

Cache Dynamic SQL Pagination 155

Caché SQL Queries 154

$ZF(-100,..) issues 145

InterSystems Platform Functions 127

Docker with overlay support 124

Atelier. Compilation returns "Failed to read /api/atelier/v1/..." 123

Error: CSP application closed the connection before sending a response 122

Use GZIP to compress/decompress files 112

K-Means clustering of the Iris Dataset 76

Intersystems Cache Python Object-Relational Mapper 74

The way to launch Apache Spark + Apache Zeppelin + InterSystems IRIS 72

Continuous Delivery of your InterSystems solution using GitLab - Part VIII: CD using ICM 70

Storage Performance Series - NetApp All-Flash FAS (AFF) A300 69

Load a ML model into InterSystems IRIS 57

Most voted

Caché SQL Queries 9

GraphQL for InterSystems Data Platforms 7

Caché and Ensemble 2018.1 Field Test Release 7

The way to launch Apache Spark + Apache Zeppelin + InterSystems IRIS 6

Use GZIP to compress/decompress files 3

Check audit settings programmatically 3

K-Means clustering of the Iris Dataset 3

Docker with overlay support 3

Load a ML model into InterSystems IRIS 3

Storage Performance Series - NetApp All-Flash FAS (AFF) A300 2

Most commented

Error: CSP application closed the connection before sending a responce 30

Create studio project file 14

Atelier and Studio 12

Cache Dynamic SQL Pagination 10

Unable to export lookup tables (.LUT) and HL7 schemas (.HL7) directly via Atelier to commit in source control (GIT) 9

Using regular expressions in a routing rule 9

zgetFile+8^User.Read.1 8

$ZF(-100,..) issues 7

Multi-line terminal commands 7

Querying ODBC SQL Server 7

0 0
0 345

The recording of Anton Umnikov's It's Machine Learning, Not Rocket Science! webinar is now available on learning.intersystems.com.

In it, Anton provides a great, high-level introduction to machine learning and shows why you don't need to be a "unicorn" data scientist to start using machine learning to your advantage!

Watch it now

0 0
0 205

Hi all. We are going to find duplicates in a dataset using Apache Spark Machine Learning algorithms.

Note: I have done the following on Ubuntu 18.04, Python 3.6.5, Zeppelin 0.8.0, Spark 2.1.1

Introduction

In previous articles we have done the following:

0 0
1 676

Hi Community!

New session recording from Global Summit 2018 is available on InterSystems Developers YouTube Channel:

An Outlook on Scaling Out

https://www.youtube.com/embed/lyACfOWDFFg
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

0 0
0 239
Announcement
· Jan 26, 2018
New Video: Java Business Hosts

Hi, Community!

Please find a new session recording from Global Summit 2017:

Java Business Hosts

https://www.youtube.com/embed/ZOYZdojTqfQ
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

2 0
0 388

Hi Community!

Join us at the FHIR event of the year in the US: the HL7 FHIR Dev Days 2018!
A unique chance to meet 400 colleagues and discuss all topics relating to your field.

InterSystems is proud to be the Host Sponsor of HL7 FHIR Dev Days for its first U.S. edition, Boston, June 19 – 21st! We support the HL7 FHIR standard as it is critical for rapid innovation. FHIR can be used as an accelerant to bring all the information that matters for a patent into a unified health record.

0 0
0 457

Hi, Community!

This post is a digest of the Developer Community postings in June 2018.

Most viewed

Atelier 1.2 Stable Release 230

InterSystems IRIS Data Platform 2018.1.1 Release 199

"IF THEN - $SELECT - $CASE" - What is the best way? 179

$CASE For Long Stories 148

Translate a number to text 147

Sort ordering 141

Extending method keywords 138

Stop Storing Atelier Credentials 133

COMANDO $ZF 130

Multi Language Sort 125

Most voted

Atelier 1.2 Stable Release 7

Translate a number to text 7

InterSystems IRIS Data Platform 2018.1.1 Release 6

Multi Language Sort 5

InterSystems on DeveloperWeek NYC, June 18-20 5

Atelier at EclipseCon France 2018 4

Installation Manifest - I can disabled the journal globals by the XML? 3

Creating SSL-Enabled Mirror on InterSystems IRIS Using Public Key Infrastructure (PKI) 3

One simple Docker trick to halve your image build time 2

DC June 2018 Release 2

Most commented

Communication link failure trying to access Studio 15

$CASE For Long Stories 14

How to convert page number to roman numeral in ZEN Report? 14

Extending method keywords 13

How to navigate to parent of Serial Object? 12

Kill process started by JOB 11

Custom file pass through Operation writing out unreadable pdf files 11

Has anyone tried REST API Put Or Post on AWS S3 ? 10

%ProcessError+6 ^%Net.Remote.Proxy.1 error occurs inconsistently 10

How to Update Caché User Full Name field via SQL? 9

Top 10 Authors to Follow by Views

Francisco López, Posts, 147

Eduard Lebedyuk, Posts, 73

Daniel Kutac, Posts, 45

Pete Greskoff, Posts, 34

Top 10 Experts to Follow

Nicole Aaron, Answers, +11

Robert Cemper, Answers, +10

Eduard Lebedyuk, Answers, +9

Vitaliy Serdtsev, Answers, +7

Benjamin Spead, Answers, +4

Francisco López, Answers, +4

Evgeny Shvarov, Answers, +3

Dmitry Maslennikov, Answers, +3

Gilberto Junior, Answers, +3

Timothy Leavitt, Answers, +2

0 0
0 187
InterSystems Official
· Sep 29, 2018
InterSystems Caché and Ensemble 2018.1 Release

InterSystems is pleased to announce that InterSystems Caché and Ensemble 2018 are now released!

New in these releases are features that improve security and operations, including:

· Key Management Interoperability Protocol (KMIP) support
· Microsoft Volume Shadow Copy (VSS) integration
· Integrated Windows Authentication support for HTTP
· SSH enhancements

5 0
0 1.7K
Announcement
· Dec 3, 2018
DC October-November 2018 release

Hi Community!

As you know or maybe guess we keep working on making Developer Community a better place for you, developers on InterSystems Data Platforms.

And here is the release on what we did in October-November.

Key visible enhancements:

better monthly digests,

InterSystems Best Practices,

Speed up mailings.

And a lot of small, but nice things - check the details inside.

1 0
0 166

Hi, Community!

Check a new session recording from Global Summit 2017:

iKnow What You'll Do Next Summer

https://www.youtube.com/embed/7Y5mdY3M3vo
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

1 0
0 334

In this series of articles, I'd like to present and discuss several possible approaches toward software development with InterSystems technologies and GitLab. I will cover such topics as:

  • Git 101
  • Git flow (development process)
  • GitLab installation
  • GitLab Workflow
  • Continuous Delivery
  • GitLab installation and configuration
  • GitLab CI/CD
  • Why containers?
  • Containers infrastructure
  • GitLab CI/CD using containers

In the first article, we covered Git basics, why a high-level understanding of Git concepts is important for modern software development, and how Git can be used to develop software.

In the second article, we covered GitLab Workflow - a complete software life cycle process and Continuous Delivery.

In the third article, we covered GitLab installation and configuration and connecting your environments to GitLab

In the fourth article, we wrote a CD configuration.

In the fifth article, we talked about containers and how (and why) they can be used.

In this article let's discuss main components you'll need to run a continuous delivery pipeline with containers and how they all work together.

4 0
2 3.6K

Hi Everyone!

Enjoy a new session recording from Global Summit 2017 on InterSystems Developers YouTube Channel:

Tell Your Story With Dashboards

https://www.youtube.com/embed/arqeNXegFDw
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

0 0
0 305

Hi Community!

Please welcome a new session recording from Global Summit 2017:

We Want More! - Solving Scalability

https://www.youtube.com/embed/yf-pj3EOSzo
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

0 0
0 286

Good afternoon everyone,

I hope you are well,

I am currently working on the below opportunity and if anyone here would like to hear more details please feel free to contact me on 01908 886 030 or teo.rusu@identifiglobal.com

Met with the client yesterday, beautiful office in Waterloo London, latest tech available with many benefits including working from home 2 days/w as well!

Intersystems Caché Senior Software Engineer

London

4 0
1 519

Hi Community!

New video "Deploying Shards Using InterSystems Cloud Manager" is available now on InterSystems Developers YouTube:

https://www.youtube.com/embed/UV1zYRQUPlw
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

1 0
0 277

Hi Community!

Please welcome a new video on InterSystems Developers YouTube:

Deploying Shards Using the API

https://www.youtube.com/embed/pPuWoa_KD7A
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

0 0
0 398