dtd

No grammar constraints (DTD or XML schema) detected for the document (Android)

给你一囗甜甜゛ 提交于 2019-12-10 12:33:59
问题 I have the same problem as many here, but i DO HAVE xmlns:android and the xml=... tags. Still I have the same error. I don't wan't just click the ignore instead of warning in the settings so hence the question here posted. The source is: <?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > </GridLayout> The error: "No grammar constraints (DTD or XML schema)

XML: How to load the contents of one xml file into another

ε祈祈猫儿з 提交于 2019-12-10 11:30:45
问题 I would just like to be able to dynamically write the contents of an xml file from another xml file. A.XML contains: <?xml version="1.0"?> <node> -Include Contents of b.xml </node> B.XML contains: <anode> a </anode> is there any way to do this in xml? End product looks like this: <?xml version="1.0"?> <node> <anode> a </anode> </node> Update from comments : In xml alone. so that when i view the xml file in a browser it renders correctly 回答1: Use an external (parsed) general entity to

.NET: Prevent XmlDocument.LoadXml from retrieving DTD

笑着哭i 提交于 2019-12-10 01:23:48
问题 I have following code (C#), it takes too long and it throws exception: new XmlDocument(). LoadXml("<?xml version='1.0' ?><!DOCTYPE note SYSTEM 'http://someserver/dtd'><note></note>"); I understand why it does that. My question is how do I make it stop? I don't care about DTD validation. I suppose I could just regex-replace it, but I am looking for more elegant solution. Background: The actual XML is received from a web site I do not own. When site is undergoing maintenance it returns XML with

Problem validation a XML file with a local DTD file in C#

只愿长相守 提交于 2019-12-09 13:03:05
问题 I'm triying to validate a XML file. I'm using this code XmlReaderSettings settings = new XmlReaderSettings(); settings.ProhibitDtd = false; settings.ValidationType = ValidationType.DTD; settings.ValidationEventHandler += new ValidationEventHandler(validationError); XmlSchemaSet schemas = new XmlSchemaSet(); settings.Schemas = schemas; XmlReader reader = XmlReader.Create(lblXmlPath.Text, settings); reader.Settings.Schemas.Add(null, lblDTDPath.Text); while (reader.Read()) { // empty by now }

How do I declare attributes common to multiple elements?

元气小坏坏 提交于 2019-12-08 19:11:46
问题 I have multiple elements I want to give these attributes: <!ATTLIST [all these elements] width CDATA "0" height CDATA "0" margin CDATA "0 0 0 0" padding CDATA "0 0 0 0" rotation CDATA "0" halign (left|center|right|full) "center" valign (top|middle|bottom|full) "middle" > Is this possible somehow in DTD, or will I have to do it manually? (Also, while I'm here, I don't think it was such a good idea to declare the margin and padding attributes that way. Does anyone know a better way?) 回答1: Each

How to use DOCTYPE in Spring XML file

落花浮王杯 提交于 2019-12-08 10:23:39
问题 Most of the time we do not declare DOCTYPE in Spring. But I want to declare a DOCTYPE in my XML context file so that I can use ENTITY in my xml file. For example: <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd" [<!ENTITY % crmHome SYSTEM "crm-home.dtd"> %crmHome;] > This gives many errors like... - Attribute "xmlns" must be declared for element type "beans". - Attribute "xmlns:xsi" must be declared for element type "beans". etc...

dtd and mixed content

旧时模样 提交于 2019-12-08 04:52:53
问题 Does someone know way a mixet content element (in dtd) there is a need to add the "*" at the end? For example: <!ELEMENT note (#PCDATA|to|from|header|message)*> I'm reffering to the case where I don't want to repeat anything again... I just want to be able to choose between #PCDATA and other elements. I know that if I drop the "*" in the end of the decleration I will get a bad DTD decleration... But - I have no idea what is the reason of that... Anyone know why? 回答1: You're hitting this

The entity “nbsp” was referenced, but not declared

£可爱£侵袭症+ 提交于 2019-12-08 04:12:51
问题 I have written one XSLT to transform xml to xml. Input XML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> OutputXML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> XSL FILE: i have added the code for entity nbsp declaration under doctype at and replace with entity but still are same error The entity "nbsp" was referenced, but not declared. <xsl:template match="test"> <test> <xsl:apply-templates/> </test> 回答1: You need to

The entity “nbsp” was referenced, but not declared

♀尐吖头ヾ 提交于 2019-12-08 04:09:24
I have written one XSLT to transform xml to xml. Input XML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> OutputXML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> XSL FILE: i have added the code for entity nbsp declaration under doctype at and replace with entity but still are same error The entity "nbsp" was referenced, but not declared. <xsl:template match="test"> <test> <xsl:apply-templates/> </test> You need to have the input declare the entities it uses, as done in http://xsltransform.net/gVhD8QR with e.g. <!DOCTYPE

The new RefSeq release from NCBI is compatible with Bio.Entrez.Parser?

随声附和 提交于 2019-12-08 03:16:41
问题 I'm new with python and especially with Biopython. I'm trying to take some information from an XML file with Entrez.efetch and then read it. Last week this script worked well: handle = Entrez.efetch(db="Protein", id="YP_008872780.1", retmode="xml") records = Entrez.read(handle) But now I'm getting an Error: > Bio.Entrez.Parser.ValidationError: Failed to find tag 'GBSeq_xrefs' in the DTD. To skip all tags that are not represented in the DTD, please call Bio.Entrez.read or Bio.Entrez.parse with