问题标签 [sgml]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
perl - 从 Perl 中的 SGML DTD 获取所有信息
我想从 SGML DTD(元素、属性等)中获取信息。我试图在模块 use SGML::DTD 的帮助下获取元素,但它不起作用。假设,如果 DTD 包含具有不同属性的重复元素,我只会得到一个元素。
我试过这个:@allelements=$dtd->get_elements(0);
是否有任何其他模块可以用来从 SGML DTD 和 SGML 解析器中检索值?
xml - 如何在 OS X 上验证 SGML?
我有一个需要验证的 SGML DTD(以及相关的 XML 数据包)。
我怎样才能在 OS X 上做到这一点?似乎大多数 XML 工具都没有“获得”SGML。
ruby - SGML 替换标签并写入 Ruby 中的新文件和不同文件
我有一个很长的 SGML 文件,我需要将其转换为另一种语法,但由于某种原因,我的代码不起作用,当我得到输出时,它是完全相同的文档,代码如下:
据我所知,我确实调用了 replaceString 方法,但我是否遗漏了什么或做错了什么?
注意:我是 Ruby 的新手
html - 用于存储旧文本文档(塔木德、圣经等)的适当 XML 应用程序
我计划建立一个简单但广泛的古老宗教文献数据库。我想知道是否有人可以建议一种现有的 XML 兼容格式来存储此类文档。最好是一个简单的,很容易转换为 xhtml。我听说过 TEI,但是 afaik,TEI 基于 SGML,不符合 XML。在此先感谢,欢迎任何意见。
xml-parsing - Python 3 的 SGML 解析器?
我有一些使用 SGML 构建的文档,并且我有一个描述这种结构的 DTD 文件。
有人可以向我推荐一个 Python-3 兼容的库或模块来解析这些数据吗?对于 Python 2.x,我的 Google-fu 似乎出现了SGMLParser,但现在当然不推荐使用(并且从 Py3k 中彻底删除)。
许多人似乎建议lxml
,但由于依赖问题,这对我来说不是一个选择。
我知道BeautifulSoup
这对于混乱的标记很有用,但是 A)最后我听说它不兼容 py3k,并且 B)这个内容结构良好。
html - 将 HTML 文件转换为 SGML
我有格式良好的 HTML 文件。要将它们转换为 SGML,我只是切换扩展名还是还有更多工作要做?
python - 在 Python 3 中使用开放的任意标签解析 SGML
我正在尝试解析一个文件,例如: http ://www.sec.gov/Archives/edgar/data/1409896/000118143112051484/0001181431-12-051484.hdr.sgml
我正在使用 Python 3,并且无法使用现有库找到解决方案来解析带有开放标签的 SGML 文件。SGML 允许隐式封闭标签。当尝试使用 LXML、XML 或漂亮的汤解析示例文件时,我最终会在文件末尾而不是在行尾关闭隐式关闭标签。
例如:
这最终被解释为:
但是,我需要将其解释为:
如果有一个非默认解析器可以传递给可以处理这个问题的 LXML/BS4,我会错过它。
c# - 解析 HTML 和 SGML 文件的建议
我有一个项目将接受诸如(html、sgml、xml 和 txt)之类的输入。
我解析 XML 文件和 txt 文件没有问题,你能推荐一些我可以用来解析 html 或 sgml 文件的工具吗?
php - 非 SGML 字符数 6
我正在处理的网站出现以下验证错误
在 FireFox 源代码查看器中,以下行的文本为红色
当我使用 Web 开发人员 FireFox 插件并选择“编辑 HTML”选项时,有一个红点,所有标签都<title>
消失了。也没有正文标签,在 FireFox 源代码查看器中显示为红色的两个段落标签也不见了。换句话说,红色表示某种错误,但我在源代码中看不到任何错误。
此处显示了指示为错误的部分:
I can not see any errors in the HTML. I see no hidden control characters in any normal editor that I can get my hands on (Notepad++, UltraEdit, Notepad, Wordpad) but I do see it in the "Edit HTML" screen of the Web Developer toolbar.
Here is what I have done to try and resolve this:
- Recreate the file and retyping the supposed affected lines.
- Used various text editors to try and see the wrong file.
- Removed all recently added content and code in the file to see if this stops at any point (no luck...)
- Read all the posts I can find about "non-SGML character" I could find here and on Google, nothing seem to answer my question.
- Deleted the post in the database and recreated that (for incase this is a problem with database content). Not resolved.
- Converted all tables to MyISAM (some, including the content table, were InnoDB)
- Checked if other pages that does not draw its content from the database has the same problem (such as contact form) and it does the same.
- Played around with various character sets and encodings in my database and HTML source, as well as my PHP ini file. None affect the outcome.
- Changed the code page in all my text editors to various types to try and see this hidden non-SGML character.
- Copied all the system and application files (excluding the obvious changes such as CSS and templates and modified modules) over from another site based on the same version of CodeIgniter that works well.
Anything else you think I can do?
From the above, I conclude that either the custom modules (unlikely), the CSS stylesheets, the added jQuery libraries that are different between the sites (uniform.js, buttons.js) or the templates and views used is having some sort of pukefest on my happiness.
Please advise if you can think of something else I have missed...
Thanks!
Kobus
EDIT: Now that I am allowed to add images, I decided to make a few screenshots to explain the problem better. Maybe it helps... I initially thought it may be the whitespace in the title tag, but wasn't that...
python - 解析 EDGAR 文件
我想使用 python2.7 从 EDGAR 文件(可作为 .txt 文件在线获得)中删除任何不是文档文本的内容。文件的外观示例如下:
EDGAR 从该文件的第 48 页开始提供其文档类型定义:
我的程序的第一部分将 .txt 文件从 EDGAR 在线数据库中获取到我命名为“parseme.txt”的本地文件中。我想知道的是如何使用 DTD 来解析 .txt 文件。我会使用像 BeautifulSoup 这样的罐装解析模块来完成这项工作,但 EDGAR 的格式看起来很独特,我希望避免使用大型正则表达式来完成工作。
我的问题与Parse SGML with Open Arbitrary Tags in Python 3和Use lxml to parse text file with bad header in Python有关,但我认为与 python2.7 相关,我不关心标题- 我只关心文件的文本。