English 中文(简体)
需要处理URL的特殊性质
原标题:Need to handle special characters in URL
  • 时间:2011-03-01 07:42:30
  •  标签:
  • java
  • xml

我的意见是:

<p>
<span>first
</span>
<a href="http://tools.google.com/dlpage/cloudconnect#utm_campaign=launch&utm_source=en-na-us-gdb-GCC-Appsperience_02242011&utm_medium=blog"><span>Google Cloud Connect for Microsoft Office</span></a>
</p>

I am using xslt1.0 to convert the html to xml..my output xml is

<Relationship Id="rId12700703801" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="http://tools.google.com/dlpage/cloudconnect#utm_campaign=launch&utm_source=en-na-us-gdb-GCC-Appsperience_02242011&utm_medium=blog" TargetMode="External"/></Relationships>

地点的“XML Parsing Error: not well-information”=(在发射和安装后;utm_source)目标属性中。

I want to escape the special characters present in url through xslt and make the xml. Please help me. Thanks in advance..

问题回答

你们正在产生投入? 如果是的话,你可以使用URLEncoder。 加入适当编码,使变压者不抱怨yn。

如果这只是一个随机的html页,而且你对此没有控制,那么,你可能需要使用某些html的座标,例如标签,等等,以预先加以校正,因为大多数html的档案没有适当格式。

XSLT expects XML as input, not HTML. You need to turn your HTML into XML if you want to transform it with XSLT.

我认为,有可能用





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签