xml-parse-from-string

WebJar for xml-parse-from-string

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

xml-parse-from-string
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

xml-parse-from-string
WebJar for xml-parse-from-string
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/Jam3/xml-parse-from-string

Скачать xml-parse-from-string

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/xml-parse-from-string/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>xml-parse-from-string</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/xml-parse-from-string/
implementation 'org.webjars.npm:xml-parse-from-string:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/xml-parse-from-string/
implementation ("org.webjars.npm:xml-parse-from-string:1.0.1")
'org.webjars.npm:xml-parse-from-string:jar:1.0.1'
<dependency org="org.webjars.npm" name="xml-parse-from-string" rev="1.0.1">
  <artifact name="xml-parse-from-string" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='xml-parse-from-string', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "xml-parse-from-string" % "1.0.1"
[org.webjars.npm/xml-parse-from-string "1.0.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

xml-parse-from-string

stable

A light browser wrapper around DOMParser.parseFromString for XML, with fallback for IE8 and other browsers.

  • attempts to use DOMParser with "application/xml"
  • falls back to ActiveXObject('Microsoft.XMLDOM')
  • then falls back to createElement / innerHTML
var parseXML = require('xml-parse-from-string')

var str = '<root><foobar id="blah"></foobar></root>'
var doc = parseXML(str)
var tag = doc.getElementsByTagName('foobar')[0]

console.log(tag.getAttribute('id')) // -> "blah"

Be wary of subtle differences between implementations, such as case-sensitivity in attribute.nodeName.

PRs for Node version welcome.

Usage

NPM

root = parse(str)

Parses the string as XML and returns the root element as a DOM element, so you can do operations similar to document.getElementById, document.getElementsByTagName, and so forth.

License

MIT, see LICENSE.md for details.

org.webjars.npm

Jam3

We create modern experiences for tomorrow’s brands

Версии библиотеки

Версия
1.0.1
1.0.0