cqfn / broken-xml Goto Github PK
View Code? Open in Web Editor NEWParser that can parse any broken and invalid XML.
License: MIT License
Parser that can parse any broken and invalid XML.
License: MIT License
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright 2010-2012 Luca Garulli (l.garulli(at)orientechnologies.com)
~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you
may not use this file except in compliance with the License. ~ You may obtain
a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~
~ Unless required by applicable law or agreed to in writing, software ~ distributed
under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for
the specific language governing permissions and ~ limitations under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-parent</artifactId>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>orientdb-community</artifactId>
<!--<packaging>pom</packaging>-->
<name>OrientDB Community Distribution</name>
<properties>
<VERSION>${project.version}</VERSION>
<BUILD>${implementation.build}; ${maven.build.timestamp}</BUILD>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-test-commons</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-object</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-tools</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-distributed</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-etl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-lucene</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-studio</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>build-db</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>-XX:MaxDirectMemorySize=512g</argument>
<argument>-classpath</argument>
<classpath/>
<argument>com.orientechnologies.orient.console.OConsoleDatabaseApp</argument>
<argument>./src/test/resources/demoDB.osql</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>start-orient</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="start">
<exec executable="${project.build.directory}/${project.build.finalName}.dir/${project.build.finalName}/bin/server.sh"
spawn="true">
<env key="ORIENTDB_ROOT_PASSWORD" value="rootpasswd"/>
</exec>
</target>
</configuration>
</execution>
<execution>
<id>stop-orient</id>
<phase>post-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<exec executable="${project.build.directory}/${project.build.finalName}.dir/${project.build.finalName}/bin/shutdown.sh"
spawn="false">
<!--<env key="ORIENTDB_ROOT_PASSWORD" value="rootpasswd"/>-->
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>distribution-package</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${basedir}/src/main/assembly/archive.xml</descriptor>
</descriptors>
<filters>
<filter></filter>
</filters>
<ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>orientdb/orientdb</imageName>
<imageTags>
<imageTag>${project.version}</imageTag>
</imageTags>
<dockerDirectory>docker</dockerDirectory>
<!-- copy the service's jar file from target into the root directory of the image -->
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}/</directory>
<include>${project.build.finalName}.tar.gz</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>
It failed at this test:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project broken-xml: There are test failures.
Knowing that XML elements must follow these naming rules:
We can make rules for fixing xml for following cases.
<!-- invalid -->
<elm><fsdfsdf </elm>
<!-- valid -->
<elm><<fsdfsdf </elm>
<!-- invalid -->
<elm>< fsdfsdf ></elm>
<!-- valid -->
<elm>< fsdfsdf ></elm>
<!-- invalid -->
<elm attr="><"> </elm>
<!-- valid -->
<elm attr="<>"> </elm>
<!-- invalid -->
<elm>< fsdfsdf ></elm>
<!-- valid -->
<elm>< fsdfsdf ></elm>
<!-- invalid -->
<elm><<<<>>>></elm>
<!-- valid -->
<elm>><<<<>>>></elm>
It's bit dfferent from the case above because here we cannot have sequence < >
.
<!-- invalid -->
<elm><a<s<d<f</elm>
<!-- valid -->
<elm>><a<s<d<f</elm>
<!-- invalid -->
<elm>f>d>s>a></elm>
<!-- valid -->
<elm>f>d>s>a></elm>
<!-- invalid -->
<elm attr1="asdasd"" attr2="asdasd""> </elm>
<!-- valid -->
<elm><<fsdfsdf </elm>
<!-- invalid -->
<elm>< fsdfsdf ></elm>
<!-- valid -->
<elm>< fsdfsdf ></elm>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.