Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

What's new in the Visual Studio Code XML Extension

July 24, 2019
Nikolas Komonen
Related topics:
IDEsJava
Related products:
Developer Toolset

    A new and improved version of the Visual Studio Code XML Extension by Red Hat has been released under version 0.8.0. This new release brings new features to provide even more support for XSD-related features (the blueprint file of an XML document) along with various performance improvements.

    New Features

    Jump to opposite tag:

    Sometimes in large documents, the opposite start/end tag can be located off the screen somewhere else, making it difficult to find. Now tags are treated as hyperlinks and, through Ctrl+click, you can now jump around from either the start or end tag to the opposite end.

    Jump to opposite tag

    CDATA and comment completion:

    You can now easily complete the confusing CDATA block, along with comments.

    CDATA and comment completion

     

    XSD-related updates

    Accurate XSD-based completion:

    Prior to this release when creating an element in either an XML or XSD document the auto-completion suggestions based on XSDs were not always correct. Depending on many constraints such as minOccurs/maxOccurs, if the elements were in a sequence … the provided completion item could be invalid. In version 0.8.0, we now provide only valid elements.

    See below where a sequence with 2 elements is declared but only the first one is provided for completion:

    XSD-related updates

    XML file validation on external XSD changes:

    Originally for XML validation relative to the XSD, validation would only be triggered on an XSD change if it was open/changed internally within the VS Code application. As of this release, the server will track that XSD file externally, detect all changes, and perform the appropriate actions.

    The image below shows a validation error on an XML file in VS Code after the XSD it is linked to was changed externally in vim.

    XML file validation on external XSD changes

    Highlight a specific type in an XSD file:

    In XSD files, you can reference a type, a type defines a specific XML structure that the XML document must follow. This type can be reused and applied to multiple areas in the document, which can lead to type occurrences being used all over the place. With the ability to highlight all references, users can scroll through the document and see all of these references without having to manually search for each use.

    Highlight a specific type in an XSD file

    Auto-complete types in an XSD file:

    After defining a type, you can start applying it to elements in the XSD file. Normally, you would have to know which types have already been defined and then type it making sure to write it correctly. This auto-complete feature now gathers all existing types and provides them through completion.

    Auto-complete types in an XSD file

    Jump to the definition of a type:

    If you are in an XSD working with an element that uses a type, you might want to go to the actual definition of it to be able to see its structure. You can now Ctrl+click and go directly to the definition without having to manually search for the definition through all the other implementations.

    Jump to the definition of a type

    Search the references of a type:

    By selecting Find All References, you can now find all uses of the schema type. Doing so in VS Code will open up a mid-sized window that groups together all references to that type, making it easy to find and read through every use of the type.

    Search the references of a type

    See the number of references of a type as a CodeLens:

    Similar to the Find All References, we also provide a CodeLens that is also clickable. This will bring up the same pop-up window from Find All References as well as show how many there are.

    See the number of references of a type as a CodeLens

    Jump to the definition of a type from the XML document:

    Similar to the previous ability to go to the type definition from an XSD file, you can also right-click and select Go to Type Definition to find the type that the XML implementation references. Before you would have to figure out which element is being referenced in the XSD and then find the type definition of that element definition.

    Jump to the definition of a type from the XML document

    Documentation improvements

    Documentation from hover and completion is provided as Markdown:

    In an XSD element, documentation can be written to provide some information on that element. XML allows for the use of Markdown or HTML, and when rendering HTML it did not display well with the LSP:

    Documentation improvements information on that element

    With this release, the following documentation will now be properly displayed in Markdown, resulting in:

    Documentation will now be properly displayed in markdown

    Additionally, at the bottom of the description hyperlinks to the connected XSD file are provided:

    Hyperlinks to the connected XSD file are provided

    Performance improvements

    This release had a focus on performance improvements, and we did just that by both decreasing memory usage and improving server speed.

    Speed improvements:

    To get a bit more technical, one improvement to speed was replacing the use of some regular expressions (regex) with hand-crafted java code. In this case, the regex checked for attribute names, but as you can imagine multiple attribute name regex calls during parsing could become a bit taxing. After this change, we noticed a 2-3x speed improvement on large files!

    Document symbols preferences:

    Performance improvements

    The Language Server Protocol provides a feature known as Document Symbols/Outline. On the left side of the above gif, is the Outline, which has a symbol for each significant piece in the XML document. In a large document, you will have a huge list of these symbols that will most likely be unhelpful because of the sheer amount of them. Whenever something changes in the document, these symbols have to be recalculated, which, as you can imagine for a large document, would be very penalizing.

    To account for this, we’ve provided the ability to either selectively disable the Outline for files matched by a pattern or to just disable it completely. Doing so took a huge load off of the CPU and allowed for improved performance with large files.

    Memory improvements:

    Under the hood of the language server, we found some inefficiencies that were causing large hits to the memory; here was one of them.

    Normally when a user types, a new copy of the entire document is sent to the server to be processed. As the file grows in size it is easy to see the problem with this method as a user ends up typing multiple characters continuously. Incremental Syncing is a method provided by the LSP that allows only the changed characters to be sent to the server to provide the same result with much less data being transferred. So, that’s what we did. In doing so, a large amount of memory was saved since the buffer to hold this data would only have to be enough to hold a few characters at most instead of the entire document.

    Last updated: November 8, 2023

    Recent Posts

    • Debugging image mode with Red Hat OpenShift 4.20: A practical guide

    • EvalHub: Because "looks good to me" isn't a benchmark

    • SQL Server HA on RHEL: Meet Pacemaker HA Agent v2 (tech preview)

    • Deploy with confidence: Continuous integration and continuous delivery for agentic AI

    • Every layer counts: Defense in depth for AI agents with Red Hat AI

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.