fbpx
Home Blog Page 398

What Is XML Used For?

0
What Is XML Used For?

If you’re a new developer, you’ve probably run into the term XML and wondered what it stands for and how it’s used. The fact is that no matter what programming language you’re learning, you may have to know XML, but it’s not a programming language itself. Let’s look at what XML is, why it’s useful, and what exactly it’s used for.

What is XML, and why is it important?

XML stands for eXtensible Markup Language. It’s a language that’s used to describe data. Data stored in XML is known as being “self-defining.” This means that the structure of the data is embedded within the data itself.

Much of the information you access on computers is not stored as the final result you see in a web browser, mobile application, or desktop application. Instead, it exists in a text-based format.

Learn something new for free

Using text to store data is here to stay, but without a standard structure for this data, it’s hard to share it between applications. Without data standards, custom code would have to be written to parse it for each application accessing this data, and each new data set would need its own custom code.

Here’s an example of valid XML:

 Bob Janice Reminder Don't forget to take out the garbage! 

The XML above is valid because a tag surrounds each piece of data describing what it is. This allows developers to store context along with their data in a standard, structured format.

Because XML has standards, it can be parsed and interpreted by all types of programming languages and applications without errors or misconfigurations. The XML example above could be used between a variety of messaging apps that know its structure.

What is XML used for?

XML is a format to store data along with its structure. This feature makes it useful for many things, including transferring data, formatting documents, creating layouts, and more. Let’s take a closer look at what XML is used for.

Data transfer

Just about every application needs some way to store and retrieve data. This usually occurs over the Internet using an API (Application Programming Interface). Back-End Engineers create APIs that run on web servers.

The same API can be used by many applications, including web apps, desktop apps, and mobile apps, to save and access data in a database. A standard format for this data makes this possible.

XML is one format programmers use to transfer data in a structure that can be parsed by all these diverse applications, and it’s commonly used for creating APIs. SOAP and XML-RPC are two types of XML APIs used in web services. Any application that connects to either of these APIs only has to know the format to use the data it contains.

Formatting documents

Web pages are HTML documents, and HTML is very similar to XML. HTML is processed by a web browser, which then presents it in a visually pleasing format. The tags within an HTML document define specific types of elements, like headings, paragraphs, images, and more. The browser knows how to render these elements based on these tags.

HTML also stores contextual information about the data it contains in the form of attributes that include ID and class. CSS works with HTML to apply specific styles based on these attributes, like making a heading red or setting the font for a paragraph.

This is only one example of using XML for formatting. PDF files, PostScript files, Microsoft Word documents, PowerPoint documents, and RTF text files are also stored as XML. When you open these files in their default application, it parses this XML, formats it, and gives it the style you see on your computer screen.

Web searching

Search engines have evolved over the years. Originally, they didn’t do much more than determine if a web page contained the phrase you were looking for. Now, they use HTML (XML) tags to make searches more accurate.

An example would be searching for a book by your favorite author. Say you were searching for Mark Twain. By parsing the tag in HTML pages, a search engine can limit the search results to just those with Mark Twain in this tag instead of every page containing his name.

Creating layouts

Every layout in an Android mobile application is created in XML. These layouts determine where data should be rendered on the screen of the phone. Common Android layouts include the Linear Layout, which tells the app to align the content on the screen horizontally or vertically, the Frame Layout, which is designed to contain other layouts dynamically, and the List layout, which displays items you can scroll through.

Storing configuration data

XML also stores the data used to configure an application. In Microsoft Excel, XML holds all the information contained in a spreadsheet. Not just the data, but also the definitions of the columns, the format of the fields, any calculations they use, and more. Android apps not only use XML for layouts but also to store the colors, styles, and dimensions that the app will use.

How XML compares to other languages

XML vs JSON

XML and JSON are both formats for storing and exchanging data, but they have different use cases and characteristics. XML is verbose and supports a wide range of data types and validation features, making it suitable for complex documents. JSON, short for JavaScript Object Notation, is lighter and easier to parse, making it ideal for web APIs and data exchange between servers and web applications.

XML vs HTML

XML and HTML are markup languages that serve different purposes. XML is used for data representation and storage, and you define your own tags. HTML, on the other hand, is used for displaying data in a web browser with a fixed set of tags. While XML is more flexible, HTML is specialized for web content presentation.

What is an XML file?

An XML file is a type of file that uses tags to define data structures, enabling both humans and machines to read the data easily. XML files are often used for data interchange between systems, like in web services and configuration files.

Fun fact: These days, Microsoft Office uses the XML-based file formats .docx, .xlsx, and .pptx by default. This format reduces file sizes and better security and information recovery.

How to open and query an XML file

XML files can be opened with a variety of programs, including text editors like Notepad++ and specialized XML editors like XMLSpy. Additionally, web browsers can also render XML files, displaying them in a tree structure format for easy navigation. XPath is a language that you can use to query different parts of an XML document.

Learn more about XML

XML is a relatively simple language to learn. You can learn XML by itself, but it’s much better to learn it in tandem with a programming language to process and use the data that it stores.

XML is often used in front-end web development. It’s also is used in back-end web development because some APIs use it to transfer data in a standard format. Check out our web development courses to learn more.

Android applications also depend heavily on XML to create layouts and store configurations, so you should learn XML if you’re interested in mobile development.

Every programming language you can think of either has built-in ways to use XML or third-party libraries that make it possible, so when you choose a programming language from our course catalog, there’s a good chance you’ll run into some XML.

This blog was originally published in August 2021 and has been updated to include details about XML files and new courses.

We’re Collaborating with the Mark Cuban Foundation’s AI Bootcamps

0
We’re Collaborating with the Mark Cuban Foundation’s AI Bootcamps

Exciting news: We’re teaming up with the Mark Cuban Foundation’s AI Bootcamp Initiative to help foster the next generation of technologists and AI practitioners. Codecademy is providing free Pro annual subscriptions to high school students who complete the MCF’s in-person AI bootcamps in November 2024.  

“This collaboration with Codecademy reflects our shared commitment to education for students who are underrepresented in technology careers,” entrepreneur and investor Mark Cuban said in a release. “Once students receive foundational knowledge in AI through our bootcamps, they can continue to build on that with free access to Codecademy courses that are used in many in-demand career paths. Our relationship will create a pipeline ready for future innovations because preparing young minds today is an investment in tomorrow’s leaders.” 

The AI Bootcamps Initiative at MCF, the private nonprofit led by Mark Cuban, seeks to empower young people to use emerging technology to create more equitable futures for themselves and their communities. Underserved high school students can attend these free, three-day bootcamps to learn about AI from experts. To date, more than 1,600 students in over 30 cities have attended the MCF AI Bootcamps.  

Learn something new for free

Tumi Ojo, is a rising freshman in college who attended the MCF AI Bootcamp in Pittsburgh in 2023 and is now a student ambassador and officer for the bootcamps. She appreciated the opportunity to explore her curiosity for STEM outside of a traditional school setting.  

“It was great to spend my Saturdays doing something like that,” Tumi says. “No one really knows what the future of the world will be with AI, so this is a great way to be knowledgeable in the subject and know more about it than the average person.”  

AI tools like ChatGPT are already laced into students’ lives. (Even our interactive Codecademy courses include AI tools and assistance!) The workshops and lectures at the bootcamps help young people think critically about topics like the limits of AI and the ethical implications of AI systems, so they can be informed and responsible AI practitioners. At the end of the bootcamp, students work in groups to create a capstone AI project designed to make a positive impact on their lives.   

With full access to our catalog of coding, AI, data science, and professional skills courses, it’s our hope that these students can continue to explore technology at their own pace, discover a new passion, and develop practical skills that’ll make them a key contributor in any professional setting.  

How to get involved 

Over three consecutive Saturdays, underserved 9-12 grade students can apply to attend the bootcamps to learn foundational AI skills. This year, bootcamps are available for students in 31 locations across the US including: Fargo, North Dakota; Detroit, Michigan; Honolulu, Hawaii; Pittsburgh, Pennsylvania; San Diego, California; and Portland, Oregon. Good to know: the last day to apply is September 30!   

Students don’t need to have a programming background or tech career aspirations to benefit from the bootcamps. “You just need the desire to learn something new about AI —basically a topic that no one really is an expert on quite yet,” Tumi says.  

Visit the MCF website to learn more about how to apply to the MCF AI Bootcamp 2024. Not a high schooler? Your company can volunteer to host a 2025 AI Bootcamp with the MCF in your city. Don’t forget to check out Codecademy’s special discounts for students and educators.     

Word of the Day: atrophy

0

This word has appeared in 36 articles on NYTimes.com in the past year. Can you use it in a sentence?

On Stonehenge and Mispronouncing ‘Kamala’: The Winners of Our Week 10 Summer Reading Contest

0

As our contest comes to a close, we honor both a video and an essay, and hear from students and judges about their experiences participating this year.

The Ultimate 2025 Planner is Here!

0
The Ultimate 2025 Planner is Here!

The Ultimate 2025 Life, Blog, and Social Media Planner

Can you believe it’s that time of year again? Our beloved planners are back and better than ever! We’ve listened to your feedback and simplified things. Say goodbye to separate Blog and Life planners.

Introducing The Ultimate 2025 Life, Blog, and Social Media Planner!

This single planner combines the best of both worlds, offering 99 meticulously designed pages to help you stay organized. And with four size options (US Letter, A4, A5, and Personal), there’s a perfect fit for every planner lover.

The best part? It costs almost 50% less than buying our previous planners separately! Ready to design the life you’ve always dreamed of?


What’s new in 2025?

Discover the exciting new features in our updated planner.

#1 Life & Blog planner combined as one

The Ultimate 2025 Planner is your all-in-one solution for a more organized life. With 99 carefully designed pages, you can effortlessly plan everything from social media strategies to meal planning and financial goals. From daily to-do lists to in-depth blog post outlines, this digital planner offers the flexibility to print what you need, when you need it. Achieve your dreams one step at a time with our comprehensive planner.

#2 Stylish page dividers

Instead of just printable posters, each planner size now has four stylish pages that you can use as dividers for your planner or printable posters.

Stylish printable planner page dividers

I kept the design simple and black and white so you can let your creativity shine! Color, doodle, or decorate to your heart’s content. Planning doesn’t have to be stressful – take breaks and enjoy the process!

#3 Updated, print-friendly design

For a cleaner, more print-friendly look, we’ve removed the black flag from the planner’s corner.

#4 Twitter is now correctly the X platform

We know everyone still calls it Twitter, but our planner has been updated with the new X logo!

#5 New lower price

And the best is yet to come! We’ve slashed the price in half! You can now get The Ultimate 2025 Planner for just $19.99 – that’s less than half the cost of our previous planners combined. With 99 pages packed with features, you’ll have everything you need to conquer your goals.


Are you ready to plan your perfect year?


Stay tuned for more!

We’re also excited to announce that our free planner is getting a makeover! Stay tuned for the updated version, launching on our blog next month. Don’t miss out – subscribe to our newsletter for the latest news!

Word of the Day: hatchling

0

This word has appeared in six articles on NYTimes.com in the past year. Can you use it in a sentence?

Gen AI: Latest Trends and Impacts on Training and Learning

0
Gen AI: Latest Trends and Impacts on Training and Learning

Structured State Space (SSM)

Mamba?

For folks who are developers, yes. For others? Well, not likely, although the SSM is something to just put down for a rainy day, because of what the possibilities are when it comes to the whole architecture thing.

Mamba with a SSM foundation improves performance and efficiency. That’s a good thing. Whether or not, it does so, far more than an LLM that isn’t using it, is still up to debate. This thing gets into transformers, which will bore you, so let’s move on.

Ice cream break anyone?

  • S&P Global Partners with Accenture rolled out an AI training program for 35,000 employees
  • 40% of the workforce will need to reskill over the next three years to stay relevant (IBM Institute of Business Value in talking to a vareity of executives) – Hey, who is that guy who keeps screaming about reskilling as the focus and not just upskilling? Hmm, I think he is writing this as you read.
  • 85 million jobs (worldwide) could be disrupted in medium and large businesses as soon as 2025, due to automation (World Economic Forum) – that’s automation with AI and it’s across quite of number of industries.
  • Over in China, Longwriter-6k can generate over 10,000 words (which trust me, is a lot) – the downside? Those pesky hallucinations and stuff like spam and other garbage being outputted. The Pluses? Longwriter -9B-DPO did better overall in two categories than anything OpenAI, Anthropic, Meta, Mistral produced (Github)
  • Microsoft’s Phi-3.5-V-4.2B (Vision, SLM) outperformed GPT-4o (latest from OpenAI); Phi 3.5 offers a mini version, a MOE version, and Vision version (Results based on the 5-shot MMLU)
  • Phi 3.5 – all its versions are SLMs. There are vendors who use the LLM of Llama (Meta) – its one of the open source language models out there; but because nobody is using a SLM yet, Nvidia created Llama-3.1-Minitron 4B – (For those interested in learning more about pruning and distillation, LMK – otherwise, let’s continue)
  • Futurepedia
  • Creati.ai

Progress your career with the iMBA from Gies College of Business

0
Progress your career with the iMBA from Gies College of Business

Claire recently completed the iMBA from Gies College of Business at the University of Illinois Urbana-Champaign (UIUC). Ranked “#1 Biggest B-School Innovation of the Decade” from Poets&Quants, the iMBA program includes learners from nearly 100 countries across the globe and 88 of the Fortune 100 companies. The diversity of the class profile allows learners like Claire to explore new career avenues and grow their professional networks. 

Claire is from Taiwan and her career has spanned many fields. “Before the program, my expertise was primarily in journalism, which then expanded into corporate public relations, communications, and marketing,” she reveals, adding, “I gained valuable experience in journalism, followed by PR and branding and marketing.”

Even with her impressive background, Claire felt a desire to add to her abilities and grow her influence throughout her organization. She explains, “I realized that despite my years of experience, I needed to interact with other departments like finance and lacked certain skills. I wanted to “level up” in skills and connections to gain visibility within the company and get exposure to new ideas and thoughts.”

As these professional ambitions took hold of her, Claire remembers, “I saw a digital banner on Coursera and it stayed in the back of my mind.” When it was time to pursue her master’s degree, she concluded, “The cost and Gies’ solid academic structure were major deciding factors, offering a good balance of knowledge and connections.” With so many reasons to go after the degree, Claire ‌soon submitted her application and was accepted to the program.

Once Claire began her coursework, the challenge of balancing her professional responsibilities with her studies was significant—but the rewards were substantial. “I’ve enjoyed the learning process and have taken advantage of networking resources. I’ve connected with peers through live classes, breakout sessions, group projects, and networking events. There are also local and student-led meetups abroad, which have been beneficial. A group of about 40 of us throughout the Asia-Pacific region met in Singapore, and it was all student-led,” she says while describing what it’s like to be part of the program. 

In her last MBA class, the professor’s parting words that “be humble and kind” and “always help the next in line” resonated with her. Driven by the message, she has continued to serve as a Gies Ambassador for three consecutive terms, interacting with prospective students through more than 20 webinars, workshops, and marketing content creation initiatives with a genuine passion for giving back. For example, she was a panelist in the Gies ROI Series on the Banking and Financial Industry, one of the top industries within the Gies program.  

Over the course of these different encounters, Claire became emboldened to take her professional life in a radically new direction. “My previous experience was all with big, public companies. The program connected me with entrepreneurial students, which gave me the inspiration and motivation to pursue a career in the tech start-up realm,” she shares.

Since her time in the program, Claire has used the iMBA from Gies to secure an elevated role where she has greater involvement in strategic business decisions. Before her career pivoted to the start-up, she was promoted to the vice president of digital marketing in one of Taiwan’s major financial services firms. Today, she’s the Taipei office lead, managing operations, global marketing, and supports business development, clients and projects for a global tech start-up. 

Her journey from journalism to tech shows what you can do when you earn the right degree for your career goals. Claire’s shift from established companies to a dynamic start-up environment was a bold move, guided by the relationships she developed during her program. The networking opportunities she had were invaluable, as she came into contact with driven individuals from diverse backgrounds. If you’re looking for ways to make big changes in your own career, you can start by digging into the details of the iMBA from Gies—just like Claire did.

Learn more about the Master of Business Administration.

Can You Identify These Books By Their Bad Reviews in The Times?

0
Can You Identify These Books By Their Bad Reviews in The Times?

“The author undoubtedly meant her to be queer, but she is altogether too queer. She was only 11 years old when she reached the house in Prince Edward’s Island that was to be her home, but, in spite of her tender years, and in spite of the fact that, excepting for four months spent in the asylum, she had passed all her life with illiterate folks and had bad almost no schooling, she talked to the farmer and his sister as though she had borrowed Bernard Shaw’s vocabulary, Alfred Austin’s sentimentality and the reasoning powers of a Justice of the Supreme Court.”

Word of the Day: menial

0

This word has appeared in 38 articles on NYTimes.com in the past year. Can you use it in a sentence?