如何在xml中添加形状颜色? [英] How to add shape color in a xml ?

查看:101
本文介绍了如何在xml中添加形状颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个语法规则,但是我无法改变每个节点的形状颜色,如果我改变颜色,它默认为白色。 wt是问题......



< pre lang =XML> 



 <?  xml     version   =  1.0   编码  =  utf-8  >  
< grammarRule xmlns:xsi = http://www.w3 .org / 2001 / XMLSchema-instance xmlns:xsd = http://www.w3.org/2001/XMLSchema >
< name > ThreeSetofVertices < / name >
< spanning > false < / spanning >
< induced > false < / induced >
< c ontainsAllGlobalLabels > false < / containsAllGlobalLabels >
< embeddingRules / >
< recognFunctions < span class =code-keyword> / >
< applyFunctions / >
< L >
< globalLabels / >
< globalVariables / >
< 节点 / >
< < span class =code-leadattribute> arcs / >
< / L >
< R >
< globalLabels / >
< globalVariables / >
< 节点 >
< ; node xsi:type = ruleNode >
< shapekey > 6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F < / shapekey >
< screenX > 23 < / screenX >
< screenY > 117 < / screenY >
< 名称 > L < / name >
< localLabels >
< span class =code-keyword>< string > plane < / string >
< span class =code-keyword>< / localLabels >
< localVariables / >
< containsAllLocalLabels > false < / containsAllLocalLabels >
< strictDegreeMatch > false < / strictDegreeMatch >
< / node >
< node xsi:type = ruleNode >
< shapekey > 6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F < / shap ekey >
< screenX > 117 < / screenX >
< screenY > 40 < / screenY >
< 名称 > T < /姓名 >
< localLabels >
< 字符串 > plane < / string >
< / localLabels >
< span class =code-keyword><
localVariables / >
< containsAllLocalLabels > false < / containsAllLocalLabels >
< strictDegreeMatch > false < / strictDegreeMatch >
< / node >
< node xsi:type = ruleNode >
< shapekey > 6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F < / shapekey >
< screenX
> 249 < / screenX >
< screenY > 136 < / screenY >
< name > R < / name >
< localLabels >
< string > plane &l t; / string >
< / localLabels >
< localVariables / >
< containsAllLocalLabels > false < / containsAllLocalLabels >
< strictDegreeMatch > false < / strictDegreeMatch <温泉n class =code-keyword>>
< / node >
< node xsi:type = < span class =code-keyword> ruleNode >
< shapekey > 6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F < / shapekey >
< screenX > 72 < / screenX >
< screenY > 192 < / screenY >
< name > Bm < / name >
< localLabels >
< string > plane < / string >
< / localLabels >
< localVariables / >
< containsAllLocalLabels > false < / containsAllLocalLabels >
< strictDegreeMatch > false < / strictDegreeMatch >
< / node < span class =cod电子关键字>>
< node xsi:type = ruleNode >
< shapekey > 6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F < / shapekey >
< screenX > 188 < / screenX >
< screenY > 200 < / screenY >
< name > Bc < / name >
< localLabels >
< string > plane < / string >
< / localLabels >
< < span class =code-leadattribute> localVariables / >
< containsAllLocalLabels > false < / containsAllLocalLabels >
< strictDegreeMatch > false < / strictDegreeMatch >
< / node >
< node xsi:type = ruleNode >
< shapekey > 6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F < / shapekey >
< screenX > 217 < / screenX >
< screenY > 64 < / screenY >
< 名称 > I < span class =code-keyword>< / name >
< localLabels / >
< localVariables / >
< containsAllLocalLabels > false < / containsAllLocalLabels >
< strictDegreeMatch > false < / strictDegreeMatch >
< / node >
< / nodes >
< arcs / >
< / R >
< / grammarRule >

解决方案

我没有在xml定义中看到任何定义形状颜色的元素或属性。



即使你这样做,xml也只是一种声明性语言而且它本身没有任何作用。由您来决定如何阅读和处理xml数据中可用的信息。


Hi, I have written a grammar rule, but i can't able to change the shape color of each node, if i change the color, it remains default as White. wt's the problem......

<pre lang="XML">


<?xml version="1.0" encoding="utf-8"?>
<grammarRule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <name>ThreeSetofVertices</name>
  <spanning>false</spanning>
  <induced>false</induced>
  <containsAllGlobalLabels>false</containsAllGlobalLabels>
  <embeddingRules />
  <recognizeFunctions />
  <applyFunctions />
  <L>
    <globalLabels />
    <globalVariables />
    <nodes />
    <arcs />
  </L>
  <R>
    <globalLabels />
    <globalVariables />
    <nodes>
      <node xsi:type="ruleNode">
        <shapekey>6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F</shapekey>
        <screenX>23</screenX>
        <screenY>117</screenY>
        <name>L</name>
        <localLabels>
          <string>plane</string>
        </localLabels>
        <localVariables />
        <containsAllLocalLabels>false</containsAllLocalLabels>
        <strictDegreeMatch>false</strictDegreeMatch>
      </node>
      <node xsi:type="ruleNode">
        <shapekey>6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F</shapekey>
        <screenX>117</screenX>
        <screenY>40</screenY>
        <name>T</name>
        <localLabels>
          <string>plane</string>
        </localLabels>
        <localVariables />
        <containsAllLocalLabels>false</containsAllLocalLabels>
        <strictDegreeMatch>false</strictDegreeMatch>
      </node>
      <node xsi:type="ruleNode">
        <shapekey>6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F</shapekey>
        <screenX>249</screenX>
        <screenY>136</screenY>
        <name>R</name>
        <localLabels>
          <string>plane</string>
        </localLabels>
        <localVariables />
        <containsAllLocalLabels>false</containsAllLocalLabels>
        <strictDegreeMatch>false</strictDegreeMatch>
      </node>
      <node xsi:type="ruleNode">
        <shapekey>6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F</shapekey>
        <screenX>72</screenX>
        <screenY>192</screenY>
        <name>Bm</name>
        <localLabels>
          <string>plane</string>
        </localLabels>
        <localVariables />
        <containsAllLocalLabels>false</containsAllLocalLabels>
        <strictDegreeMatch>false</strictDegreeMatch>
      </node>
      <node xsi:type="ruleNode">
        <shapekey>6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F</shapekey>
        <screenX>188</screenX>
        <screenY>200</screenY>
        <name>Bc</name>
        <localLabels>
          <string>plane</string>
        </localLabels>
        <localVariables />
        <containsAllLocalLabels>false</containsAllLocalLabels>
        <strictDegreeMatch>false</strictDegreeMatch>
      </node>
      <node xsi:type="ruleNode">
        <shapekey>6E92FCD0-75DF-4f8f-A5B2-2927E22F4F0F</shapekey>
        <screenX>217</screenX>
        <screenY>64</screenY>
        <name>I</name>
        <localLabels />
        <localVariables />
        <containsAllLocalLabels>false</containsAllLocalLabels>
        <strictDegreeMatch>false</strictDegreeMatch>
      </node>
    </nodes>
    <arcs />
  </R>
</grammarRule>

解决方案

I don’t see any element or attribute in your xml definition which defines the color of the shape.

And even if you do, xml is just a declarative language and does nothing on its own. It’s up to you how to read and process the information available in xml data.


这篇关于如何在xml中添加形状颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆