简体   繁体   English

XML文档结构必须在同一实体内开始和结束。 使用xslt将xml转换为html

[英]XML document structures must start and end within the same entity. xml to html using xslt

I am facing issue while trying to convert xml to html using xslt. 我在尝试使用xslt将xml转换为html时遇到问题。 following is the dummy code i am using to parse 以下是我用来解析的虚拟代码

**TransformerFactory tFactory = TransformerFactory.newInstance();
            Source xslDoc = new StreamSource( xsltPath );
            Source xmlDoc = new StreamSource( xmlPath );
            oFileOutputStream=new FileOutputStream( htmlOutputPath );
            htmlFile = oFileOutputStream;
            Transformer transformer = tFactory.newTransformer( xslDoc );
            transformer.transform( xmlDoc, new StreamResult( htmlFile ) );**

getting error as follow 得到错误如下

ERROR: 'XML document structures must start and end within the same entity.' 错误:“ XML文档结构必须在同一实体内开始和结束。” ERROR: 'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: XML document structures must start and end within the same entity.'|#] Any idea 错误:“ com.sun.org.apache.xml.internal.utils.WrappedRuntimeException:XML文档结构必须在同一实体内开始和结束。” |#]任何想法

It seems that you have closed the stream while transformer is still doing the work. 看来您在变压器仍在工作时已关闭流。 Please check that you have not closed any stream resources. 请检查您是否尚未关闭任何流资源。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 XML错误:“ XML文档结构必须在同一实体内开始和结束。” - XML Error: “XML document structures must start and end within the same entity.” XML 文档结构必须在同一实体内开始和结束 - XML document structures must start and end within the same entity SAXParseException:XML文档结构必须在同一实体中开始和结束 - SAXParseException: XML document structures must start and end within the same entity SAX:XML文档结构必须在同一实体内开始和结束 - SAX: XML document structures must start and end within the same entity XML 文档结构必须在同一实体内开始和结束吗? - XML document structures must start and end within the same entity? SAXException = XML文档结构必须在同一实体内开始和结束 - SAXException=XML document structures must start and end within the same entity SAXParseException XML文档结构必须在同一实体中开始和结束 - SAXParseException XML document structures must start and end within the same entity javax.xml.bind.UnmarshalException:XML文档结构必须在同一实体内开始和结束 - javax.xml.bind.UnmarshalException: XML document structures must start and end within the same entity XML 文档结构必须在同一个实体中开始和结束 android studio Android Studio - XML document structures must start and end within the same entity android studio Android Studio 在 netbeans 中清理和构建 javafx 应用程序时出错,XML 文档结构必须在同一实体中开始和结束 - error while cleaning and building javafx app in netbeans, XML document structures must start and end within the same entity
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM