我正在尝试使用XSLT将HTML文件转换为XML文件(使用Oxygen 9.0进行转换).
当我使用HTML文件配置和运行XSLT转换时,然后输出Oxygen
The entity 'nbsp' was referenced,but not declared
.
我的输入html文件是:
<div><span> some text</span></div>
Run Code Online (Sandbox Code Playgroud)
注:我想知道如何处理实体仅使用XSLT,我不希望让输入文件的任何更改.
任何人都可以在C#中告诉我等效的以下vb.net代码'My.Computer'方法.
My.Computer.FileSystem.RenameFile(oldname,newname)
My.Computer.FileSystem.DeleteFile(filename)
Run Code Online (Sandbox Code Playgroud)
提前致谢..
我有大量的外部文件,其中包含"ANSI"和"UCS-2 Little Endian"编码格式.
现在我想使用Visual Basic 6.0将文件编码格式更改为UTF-8.我不想修改原始文件; 我只想单独更改编码格式.
我在网上搜索过; 但无法理解VB代码,也不知道该怎么做.
我还希望能够从UTF-8编码文件中一次读取一行.
我想在加载到XDocument后删除我的xml文件的格式.我有以下代码.
Dim xmldoc As XDocument = XDocument.Parse(XMLStr)
.
.
.
.
Dim FinalStr as String = xmldoc.ToString()
Run Code Online (Sandbox Code Playgroud)
当我拿这个字符串我得到多个新行和多个空格.我不想要那些空格和新线可以任何人告诉我如何删除它.我知道可以选择SaveOptions.DisableFormatting
删除格式,但我不打算保存文档.
我也尝试了Regex,但是一些内容空间也被删除了,所以我想删除XDocument放置的格式空间和换行符.
更新:
我试过xmldoc.ToString(SaveOptions.DisableFormatting)
但它也删除了一些空格.例如,当我的xml像这样
<title>My <b>tilte</b> <i>Company</i></title>
Run Code Online (Sandbox Code Playgroud)
它删除了<b>tilte</b> <i>Company</i>
标签之间的空间.我想要我的头衔
"我的倾斜 公司 ",但它给了"我的倾斜公司 "
谁能帮我.
我正在编写一个小代码来运行CKEditor文档点击事件,但它不起作用.我的代码是,
var element = CKEDITOR.document.getById( 'Editor_TextArea' );
element.on( 'click', function( ev )
{
//mycode
alert('ok');
}
);
Run Code Online (Sandbox Code Playgroud)
谁能帮我..
我正在使用Visual Studio 2005,并使用"App.config"文件创建了一个应用程序.当我尝试编辑并向该App.config文件添加新值时,它显示错误请帮助我..
我的app.config文件包含:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="keyvalue" value="value"/>
<add key="keyvalue1" value="value1"/>
</appSettings>
<mySettings>
<add name="myname" myvalue="value1"/>
</mySettings>
</configuration>
Run Code Online (Sandbox Code Playgroud)
它显示错误:
Could not find schema information for the element "mySettings"
Could not find schema information for the element "add"
Could not find schema information for the element "myvalue"
Run Code Online (Sandbox Code Playgroud) 谁能告诉我execCommand
CKEditor中有哪些命令?喜欢editor.execCommand('bold')
我有一个小代码来选择CKEditor中的文本.为此我在javascript中使用以下代码.
var docx = editor.document;
var elementx = docx.getById(id);
editor.getSelection().selectElement(elementx);
editor.getSelection().scrollIntoView(true);
Run Code Online (Sandbox Code Playgroud)
它在Mozilla Firefox中工作正常.但是在IE9中它会抛出一个错误,因为selectElement不是一个对象.所以我检查了代码,发现getSelection()具有空值.请帮我解决一下.我在各个网站上尝试了一些答案,即使在CKEditor四分钟也没有帮助我.
我试图在 sitecore 中获取图像字段的大小,但无法实现。
我可以使用以下代码获取图像的高度和宽度。
@{
Sitecore.Data.Items.Item curItem = Sitecore.Context.Item;
Sitecore.Data.Fields.ImageField field = curItem.Fields["Image"];
}
<p>Height: @field.Height</p>
<p>Width: @field.Width</p>
Run Code Online (Sandbox Code Playgroud)
但是如何获得尺寸..?
我想使用java脚本在CKEditor中选择当前(光标位置)元素.
当右键单击事件发生时,我必须选择一个我正确点击的元素.
我如何使用CKEDITOR 4.0 的resize 事件.
我需要在编辑器调整大小时设置一些属性.在CKEDITOR 4.0 API事件就在那里.但我不知道如何使用它.
谁能告诉我如何使用它..
我有一个名为"A"的Sublayout,我有更多的内容项.我只是想找出"A"Sublayout分配给哪个内容项.我怎样才能做到这一点.?
我有一个循环,根据某些条件连续运行一个函数.现在,我想在循环内每10分钟调用一次该函数.我使用的是Visual Studio 2005.我的代码是:
while (boolValue == false)
{
Application.DoEvents();
StartAction(); //i want to call this function for every 10 minutes only
}
Run Code Online (Sandbox Code Playgroud)
我正在使用System.Timers,但它没有调用该函数.我不知道出了什么问题.
我的代码是:
public static System.Timers.Timer aTimer;
while (boolValue == false)
{
aTimer = new System.Timers.Timer(50000);
aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
aTimer.AutoReset = false;
aTimer.Enabled = true;
}
private static void OnTimedEvent(object source, ElapsedEventArgs e)
{
Application.DoEvents();
StartAction();
}
Run Code Online (Sandbox Code Playgroud) ckeditor ×5
javascript ×4
c# ×3
sitecore ×2
vb.net ×2
.net ×1
click ×1
encoding ×1
filestream ×1
find ×1
html ×1
imagefield ×1
linq ×1
linq-to-xml ×1
selection ×1
sitecore-mvc ×1
sitecore7 ×1
sitecore7.2 ×1
sitecore8 ×1
timer ×1
vb6 ×1
winforms ×1
xml ×1
xslt ×1