dtd

Parsing XHTML with DTD using XDocument

邮差的信 提交于 2019-12-22 11:59:18
问题 I need to get plain text from XHTML documents. I am sure I already read somewhere here, that XDocument on WP7 does not support DTD. I cannot find it though. Well, when I try to parse XHTML with DTD using XDocument, it throws NotSuportedException. Last call in stacktrace is at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() . That is exactly same even if I try to use some dummy XmlResolver - it doesn't really get called. (following answer in this question). So I assume that WP7 really doesn't

Parsing XHTML with DTD using XDocument

我怕爱的太早我们不能终老 提交于 2019-12-22 11:59:03
问题 I need to get plain text from XHTML documents. I am sure I already read somewhere here, that XDocument on WP7 does not support DTD. I cannot find it though. Well, when I try to parse XHTML with DTD using XDocument, it throws NotSuportedException. Last call in stacktrace is at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() . That is exactly same even if I try to use some dummy XmlResolver - it doesn't really get called. (following answer in this question). So I assume that WP7 really doesn't

Parsing XHTML with DTD using XDocument

我与影子孤独终老i 提交于 2019-12-22 11:58:01
问题 I need to get plain text from XHTML documents. I am sure I already read somewhere here, that XDocument on WP7 does not support DTD. I cannot find it though. Well, when I try to parse XHTML with DTD using XDocument, it throws NotSuportedException. Last call in stacktrace is at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() . That is exactly same even if I try to use some dummy XmlResolver - it doesn't really get called. (following answer in this question). So I assume that WP7 really doesn't

XmlDocument and slow schema processing

╄→гoц情女王★ 提交于 2019-12-22 06:40:37
问题 I have an xml template document that I need to load into an XmlDocument. eg myXMLDocument.Load(myXMLFile); However this is very slow as it loads in the dtd. I have tried both "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" and a local copy of the dtd. Both take more or less the same time. If I turn of loading the dtd by setting the resolver to null (for example), I then get errors such as "Reference to undeclared entity 'nbsp'" if the document contains these. I need to use an XmlDocument as I

Error: SyntaxError: DOM Exception 12 on Tag Creation Using jQuery

北慕城南 提交于 2019-12-22 03:48:30
问题 I have the following javascript: var orderItemQuantity = $('<input/>', { type: 'hidden', name: 'order_detail[][quantity]', value: itemQuantity }); The above javascript throws the following error message: Error: SyntaxError: DOM Exception 12 This one works without error: var newListItem = $('<li/>', { html: $('#item_name_'+itemId).text() + '(' + $('#item_quantity_' + itemId).val() +')' + '<a onclick="removeItem(' + itemId + ')">Delete this</a>' + '<input type="hidden" name="order_detail[][item

What libraries will parse a DTD using PHP

廉价感情. 提交于 2019-12-21 20:02:08
问题 I need to parse DTDs using PHP and am hoping there's a simple library to help out. Each DTD has numerous <!ENTITY... and <!-- Comment... elements, which I need to act upon. Note that I do not need to validate anything against these DTDs, simply parse them as data files themselves. A few options I've looked at: James Clarke's SD, which is an option of last resort, but I'd like to avoid the complexity of building/installing/configuring code external to PHP. I'm not sure it's even possible in my

Scope of XML languages defined by DTD vs XSD

会有一股神秘感。 提交于 2019-12-21 17:54:41
问题 Does the following propositions hold: For every DTD there is an XSD that defines exactly the same language, and for every XSD there is a DTD that defines exactly the same language. Or put another way: The collection of languages defined by any DTD is exactly the the collection of languages defined by any XSD? Expanding on the question a little: An XML document is basically a large string. A language is a collection of strings. For example, the (infinite) set of all MathML documents is a

How do you keep .NET XML parsers from expanding parameter entities in XML?

那年仲夏 提交于 2019-12-20 03:08:05
问题 When I try and parse the xml below (with code below) I keep getting <sgml>&question;&signature;</sgml> expanded to <sgml>Why couldn’t I publish my books directly in standard SGML? — William Shakespeare.</sgml> OR <sgml></sgml> Since I am working on an XML 3-way Merging algorithm I would like to retrieve the un-expanded <sgml>&question;&signature;</sgml> I have tried: Parsing the xml normaly (this results in the expanded sgml tag) Removing the Doctype from the beginning on the xml this results

Yet another question regarding the html5 dtd/schema

元气小坏坏 提交于 2019-12-19 00:32:28
问题 If there is no DTD or schema to validate the H5 document against, how are we supposed to do document validation? And by document validation, I mean "how are we supposed to ensure our html5 documents are both syntactically accurate and structurally sound?" Please help! This is going to become a huge problem for our industry if we have no way to accurately validate HTML5 documents! Sure, the W3C has an online tool that validates individual pages. But, if I'm creating A LOT of pages (hundreds,

An error has occurred opening extern DTD (w3.org, xhtml1-transitional.dtd). 503 Server Unavailable

百般思念 提交于 2019-12-18 15:46:10
问题 I'm trying to do xpath queries over an xhtml document. Using .NET 3.5. The document looks like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> .... </head> <body> ... </body> </html> Because the document includes various char entities (   and so on), I need to use the DTD, in order to load it with an XmlReader. So my code looks like this: