XML包含多个名称空间 - 但它只有一个(The XML contains multiple namespaces - but it only has one)

我正在使用SSIS导入XML文件。

当我尝试生成XSD时,它显示错误:

无法从XML文件中推断出XSD。 XML包含多个名称空间

这是XML文件的一个非常基本的清理版本:

<?xml version="1.0"?> 
<SM>  
  <xF>     
    <MA xmlns="http://www.somewhere.com/ZZ/ZZ.xsd">
  </SM>  
  .... other stuff ...
</xF>     

它肯定只有一个xmlns= ,它没有命名空间限定符,有点像这样:

无法从XML文件推断XSD .XML包含多个命名空间

....除了没有命名空间限定符(文件中唯一的:在URL中)

如果它只有一个xmlns= ,那是不是意味着它只有一个命名空间,而不是很多?

如果存在某种“固有”命名空间,则意味着SSIS无法导入任何带有xmlns=声明的xml文件。

任何人都可以澄清:一个只有一个xmlns=的XML文件有多少名称空间? 是否有一个我可以使用的工具,它将枚举命名空间,以便我可以识别它们?

有许多在线解决方案说“用xlst删除xmlns”但我宁愿首先理解为什么SSIS认为它有多个命名空间。

如果我删除xmlns部分,生成XSD并导入它导入OK。 如果我将xmlns保留并使用现有XSD导入,则不会导入任何行。 我认为这是因为XSD需要引用命名空间,但如果我将targetNamespace放入XSD,它仍然不会导入任何行。 也许我需要找一个非SSIS XML工具来做一些调查。


I'm using SSIS to import XML files.

When I try to generate XSD it shows the error:

Unable to infer the XSD from the XML file. The XML contains multiple namespaces

Here a very basic sanitised version of the XML file:

<?xml version="1.0"?> 
<SM>  
  <xF>     
    <MA xmlns="http://www.somewhere.com/ZZ/ZZ.xsd">
  </SM>  
  .... other stuff ...
</xF>     

It definitely only has one xmlns= in it, and it has no namespace qualifiers, a bit like this:

Unable to infer XSD from XML file .XML contain Multiple Namespaces

....except that there are no namespace qualifiers (the only : in the file is in the URL)

If it only has one xmlns= in it, doesn't that mean it only has one namespace, not many?

If there is some kind of 'inherent' namespace, that means that SSIS is unable to import any xml file with a xmlns= declaration in it.

Can anyone clarify: how many namespaces does an XML file with only one xmlns= in it have? Is there a tool I can use that will enumerate the namespaces so I can identify them?

There are many online solutions that say "remove the xmlns with xlst" but I would rather first understand why SSIS thinks it has multiple namespaces.

If I remove the xmlns part, generate the XSD and import it imports OK. If I leave the xmlns in and import with the existing XSD it imports no rows. I think this is because the XSD needs to refer to the namespace, but if I put targetNamespace into the XSD, it still imports no rows. Perhaps I need to find a non SSIS XML tool to do some investigation.


原文:https://stackoverflow.com/questions/32961930
2021-12-01 17:12

满意答案

Vue正在挂钩原生活动。 jQuery在本机事件之上的层中生成事件。 有关如何使用document.createEvent创建和分派本机事件的更多信息,请参阅此处:

https://learn.jquery.com/events/triggering-event-handlers/

这里有一个很好的例子: 是否可以通过编程方式模拟按键事件?


Vue is hooking native events. jQuery is generating events in a layer above native events. See this for more information on how to use document.createEvent to create and dispatch native events:

https://learn.jquery.com/events/triggering-event-handlers/

There's a good example here: Is it possible to simulate key press events programmatically?

相关问答

更多

如何从jquery触发Vue事件?(How can I trigger Vue event from jquery?)

Vue正在挂钩原生活动。 jQuery在本机事件之上的层中生成事件。 有关如何使用document.createEvent创建和分派本机事件的更多信息,请参阅此处: https://learn.jquery.com/events/triggering-event-handlers/ 这里有一个很好的例子: 是否可以通过编程方式模拟按键事件? Vue is hooking native events. jQuery is generating events in a layer above nati...

防止Vue中的事件冒泡(Prevent event bubbling in Vue)

从文档中 ,使用self事件修饰符仅捕获源自元素本身的事件... <div id="largeArea" v-on:click.self="do_X"> new Vue({ el: '#app', methods: { do_X () { console.log(Date.now(), 'do_X') } } }) #largeArea { padding: 20px; border: 1px solid black; } <s...

Vue 2与jquery选择(Vue 2 With Jquery Chosen)

将jQuery插件集成到Vue 2中的首选方法是将它们包装在一个组件中。 下面是一个封装在处理单个和多个选择的组件中的Chosen插件示例。 Vue.component("chosen-select",{ props:{ value: [String, Array], multiple: Boolean }, template:`<select :multiple="multiple"><slot></slot></select>`, mounted(){ ...

渲染后的Vue组件事件(Vue component event after render)

updated可能是你在找什么。 https://vuejs.org/v2/api/#updated updated might be what you're looking for. https://vuejs.org/v2/api/#updated

jquery触发一个事件(jquery trigger an event)

在绑定事件处理程序之后,您需要触发keyup (使用$('#code').trigger('keyup')或$('#code').keyup() ),而不是之前。 $(document).ready(function () { $('#code').keyup(function () { // function code } if ($('#code').val() != '') { $('#code').trigger('keyup');...

在jquery中全局触发事件(trigger event globally in jquery)

无论如何 ,事件将在DOM节点上下冒泡,所以在某种程度上它无论如何都是全局的; 这就是你能做到的原因: $(document).on('alwaysListen', function(){ //do stuff }); 这里有一个链接,你更新jsfiddle: https ://jsfiddle.net/fa1s9e0s/7/ Event will be bubbling across DOM nodes up and down anyway, so in some way it;...

来自jquery的点击事件的fire vue方法(Fire vue method from jquery on click event)

好吧,我撤回了我的近距离投票,因为虽然这主要是回调中的this问题,但也有一些细微差别。 首先,要使代码正常工作,您可以这样写: console.clear() new Vue({ el: '#events', mounted() { $('.logMe').on('click', (evt) => { console.log("called") const data = $(evt.target).data('logI...

用中文输入问题计算的vue 2触发器(vue 2 trigger computed with chinese input issue)

你是对的! 来自文档( https://vuejs.org/v2/guide/forms.html ): 对于需要IME (中文,日文,韩文等)的语言,您会注意到在IME合成期间v-model不会更新。 如果您也想要满足这些更新,请改用输入事件。 尝试这个: new Vue({ el: '#app', data: {value: ''} }) <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.4/vue.js"><...

使用jQuery,如何触发和由另一个版本的jQuery处理的事件?(With jQuery, how to trigger and event that is handled by another version of jQuery?)

jQuery的.trigger函数只遍历使用jQuery注册的事件处理程序。 相反,使用Native DOM事件创建和触发函数 - 无论哪个jQuery实例注册它,都应该捕获您的事件: var ev = new Event('keypress'); ev.keycode = 13; ev.which = 13; document.getElementById('fff').dispatchEvent(ev); 见http://jsfiddle.net/alnitak/b9mCL/ jQuery...

没有Node.js的Vue-Select事件触发器(Vue-Select event trigger without Node.js)

我相信你的问题在你的模板中,你需要绑定on-change属性,否则它只是向实例发送一个字符串。 <v-select v-on:on-change="hello" :options="['foo','bar','baz', 'asdf']"></v-select> 或者如果你喜欢速记。 <v-select @on-change="hello" :options="['foo','bar','baz', 'asdf']"></v-select> 编辑: 好吧我有点白痴没有注意到你需要使用v-bin...

相关文章

更多

关于solr schema.xml 和solrconfig.xml的解释

一、字段配置(schema) schema.xml位于solr/conf/目录下,类似于数据表配置文件 ...

Solr Schema.xml和solrconfig.xml分析

现在我们开始研究载入的数据部分(importing data) 在正式开始前,我们先介绍一个存储了大量 ...

[solr] solrconfig.xml

转自:http://yinwufeng.iteye.com/blog/964040 1、索引配置 m ...

对于XML 以及 DTD的一些了解

DTD 是一套关于标记符的语法规则。它是XML1.0版规格的一部分,是XML文件的验证机制,属于XML ...

Solr Schema.xml和solrconfig.xml分析(转)

Solr Schema.xml和solrconfig.xml分析 (http://yinwufeng. ...

Solr笔记(2)_Schema.xml和solrconfig.xml分析

现在我们开始研究载入的数据部分(importing data) 在正式开始前,我们先介绍一个存储了大量 ...

关于 solr schema.xml 的配置说明

schema.xml位于solr/conf/目录下,类似于数据表配置文件, 定义了加入索引的数据的数据 ...

关于 solr solrconfig.xml 的配置说明

1 &lt;?xml version=&quot;1.0&quot; encoding=&quot;U ...

最新问答

更多

您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)

将diff文件复制到存储库的根目录,然后执行以下操作: git apply yourcoworkers.diff 有关apply命令的更多信息, apply 见其手册页 。 顺便说一下:一个更好的方法是通过文件交换整个提交文件是发送者上的命令git format-patch ,然后在接收器上加上git am ,因为它也传送作者信息和提交信息。 如果修补程序应用程序失败,并且生成diff的提交实际上在您的备份中,则可以使用尝试在更改中合并的apply程序的-3选项。 它还适用于Unix管道,如下

将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)

尝试将第二行更改为snprintf(buf1, sizeof buf1, "%.2f", balance1); 。 另外,为什么要声明用该特定表达式分配缓冲区的存储量? EDIT @LưuVĩnhPhúc在下面的评论中提到我的原始答案中的格式说明符将舍入而不是截断,因此根据如何在不使用C舍入的情况下截断小数,您可以执行以下操作: float balance = 200.56866; int tmp = balance1 * 100; float balance1 = tmp / 100.0; c

OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)

这是简单的解决方案 在你需要写的控制器中 BackendMenu::setContext('Archetypics.Team', 'website', 'team'); 请参阅https://octobercms.com/docs/backend/controllers-views-ajax#navigation-context BackendMenu::setContext('Author.Plugin name', 'Menu code', 'Sub menu code'); 你需要在r

页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)

每当发出请求时ASP都会创建一个新的Page对象,并且一旦它将响应发送回用户就不会保留对该Page对象的引用,因此只要你找不到某种方法来保持生命自己引用该Page对象后,一旦发送响应, Page和只能通过该页面访问的所有对象才有资格进行垃圾回收。 ASP creates a new Page object whenever a request is made, and it does not hold onto the reference to that Page object once it

codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)

要在生产服务器中调试这个,你可以临时放 error_reporting(E_ALL); 并查看有哪些其他错误阻止正确的重定向。 您还应该检查生产服务器发送的响应标头。 它是否具有“缓存”,是否需要重新验证标头等 to debug this in production server, you can temporary put error_reporting(E_ALL); and see what other errors are there that prevents the proper

在计算机拍照在哪里进入

打开娥的电脑.在下面找到视频设备点击进去就可以了...

使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)

你是对的。 第一次输入后,换行符将保留在输入缓冲区中。 第一次读取后尝试插入: cin.ignore(); // to ignore the newline character 或者更好的是: //discards all input in the standard input stream up to and including the first newline. cin.ignore(numeric_limits::max(), '\n'); 您必须为#inc

No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)

for (int k = 0; k > 10; k++) { System.out.println(k); } k不大于10,所以循环将永远不会执行。 我想要什么是k<10 ,不是吗? for (int k = 0; k < 10; k++) { System.out.println(k); } for (int k = 0; k > 10; k++) { System.out.println(k); } k is not greater than 10, so loop

单页应用程序:页面重新加载(Single Page Application: page reload)

优点是不注销会避免惹恼用户,以至于他们会想要杀死你:-)。 说真的,如果每次刷新页面时应用程序都会将我注销(或者在新选项卡中打开一个链接),我再也不会使用该应用程序了。 好吧,不要这样做。 确保身份验证令牌存储在刷新后的某个位置,即不在某些JS变量中,而是存储在cookie或本地存储中。 The advantage is that not logging off will avoid pissing off your users so much that they'll want to kill

在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)

EXECUTE IMMEDIATE 'SELECT '||field_val_temp ||' FROM tableb WHERE function_id = :func_val AND rec_key = :rec_key' INTO field_val USING 'STDCUSAC' , yu.rec_key; 和, EXECUTE IMMEDIATE 'UPDATE tablec SET field_val_'||i||' = :field_val' USI